1. Steven Watkin
  2. PowerBuilder
  3. Tuesday, 2 April 2024 20:07 PM UTC

Hello,

I have two datawindows that are the same width and similar column names all lined up vertically, with one datawindow directly above the other. Unfortunately the datawindows extend beyond the screen width and require horizontal scrolling. 

When the user scrolls right or left in one datawindow, is there a way to trigger horizontal scrolling the other datawindow automatically so the columns stay line up?

I tried playing around with events pbm_dwnhscroll and pbm_hscroll. They seem to report the correct scroll bar position but I can't get them to trigger the scrolling.

Thank you,

Steven Watkins 

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 2 April 2024 20:34 PM UTC
  2. PowerBuilder
  3. # 1

Hi Steven;

  My STD framework has this feature. It handles both vertical, horizontal and/or split scroll bar synchronization ...

OrderEntry Demo App example:

  The code can be found on the DataWindow control base ancestor "vs_dc_master" in the method "of_set_tandem_scrolling". The activation at runtime would be for example in DC #1 ... 

THIS.of_set_tandem_scrolling ( dc_list2 , TRUE, TRUE )            // Set Tandem Scrolling ON! (Horiz & vert)

  More about the framework and the demo App that I show in this reply, can be found here: http://chrispollach.blogspot.com/2024/02/integrated.html

HTH

Regards ... Chris

Comment
  1. Steven Watkin
  2. Tuesday, 2 April 2024 20:46 PM UTC
Thank you!
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 2 April 2024 20:22 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Steven - 

Look in PB Help for the topic named "HorizontalScrollPosition property (DataWindow object)". The help includes a code snippet that shows you how to accomplish what you want.

Best regards, John

Comment
  1. Steven Watkin
  2. Tuesday, 2 April 2024 20:42 PM UTC
Thank You John. I had tried that earlier and it wasn't working for me. I must have had a bug because now it works!



This will be a nice feature, thanks!
  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.