1. Mihai Apostol
  2. PowerBuilder
  3. Wednesday, 27 September 2023 22:03 PM UTC

Good day everyone!

Version:  PB2022 R2

It seems that the horizontal scrollbar in the tabular dw is not adjusted with the content of data when the columns positions are changed dynamically:

- Let say I have a dw with a column at the right margin. 

- With a command button I will add 500 to the X positin of this column. The horisontal scroll appear. 

- With another command button I will extract 500 from the X positin of the same column in order to return it to the original position. The horisontal scroll does not desappear and I see an empty  space at the right margin of dw. 

How can I force the horisontal scrollbar to syncronize with the real content of the dw ? 

 

Note: If I reset the DataObject and retrieve the data once again it will work but this is not a solution in my case. User can have changes in updated buffer. 

Thank you!

 

 

René Ullrich Accepted Answer Pending Moderation
  1. Thursday, 28 September 2023 05:25 AM UTC
  2. PowerBuilder
  3. # 1

Hi Mihai,

AFAIK this is a very old bug or behaviour that I've already seen with the datawindow resize service in PFC long time ago.

Seems that PB only increases the maximum scroll position and never decreases it. I have not found a solution to reset it yet.

You could open a support ticket but I think it will be marked as legacy bug.

Best regards, René

Comment
  1. mike S
  2. Thursday, 28 September 2023 12:26 PM UTC
you should still open a support ticket. appeon will fix legacy bugs.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Thursday, 28 September 2023 14:20 PM UTC
If it's a bug in PowerBuilder yes. If it is problem with the PFC source code that is open-source project not maintained by Appeon.
  1. Helpful
  1. Mihai Apostol
  2. Thursday, 28 September 2023 14:24 PM UTC
It's a PB bug.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 27 September 2023 23:58 PM UTC
  2. PowerBuilder
  3. # 2

Hi Mihai;

  I would suggest trying a GroupCalc() command. You don't need group breaks in the DWO to have it work but, this command acts like a SetRedraw(true) for the DWO inside the DW Control.  HTH

Regards... Chris 

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 28 September 2023 02:45 AM UTC
Bummer ... next suggestion...

Try resizing the DW control. For example:

DC.SetRedraw(False)

DC.Width = DC.Width / 2

Yield()

DC.Width = DC.Width * 2

DC.SetReDraw (True)

HTH

Regards ... Chris
  1. Helpful
  1. Mihai Apostol
  2. Thursday, 28 September 2023 11:35 AM UTC
Unfortunately that didn't work either.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 28 September 2023 12:22 PM UTC
Try reversing ...



DC.SetRedraw(False)

DC.Width = DC.Width * 2

Yield()

DC.Width = DC.Width / 2

DC.SetRedraw(True)
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 27 September 2023 22:18 PM UTC
  2. PowerBuilder
  3. # 3

Greetings, Mihai -

Try also saving/resetting the HorizontalScrollMaximum property:

dw_1.Object.DataWindow.HorizontalScrollMaximum = 2500 // For example...

The PB Help topic for this property does not provide a useful example. You may need to supply the new value as a string... I'm not sure.

Best regards, John

Comment
  1. Mihai Apostol
  2. Wednesday, 27 September 2023 22:32 PM UTC
Thank You John,

I already tried this, the property is readonly :(
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.