1. Robert Sawyer
  2. PowerBuilder
  3. Thursday, 27 June 2024 16:24 PM UTC

Is there a way to control / trigger the windows scroll event?

 

Let's say I have window_1. Window_1 has a vertical scroll bar.

I have 5 dw's lined up vertically on the window so I need a vertical scroll bar on the window to place/view all of the dw's. Dw_5 is not visible on the window until I scroll to the bottom of the window. How could I click on a button at the top of the window and have the window scroll to the dw at the bottom?

John Fauss Accepted Answer Pending Moderation
  1. Thursday, 27 June 2024 17:45 PM UTC
  2. PowerBuilder
  3. # 1

Hi, Robert -

Please check the Q&A thread referenced below for an alternative implementation that may meet your needs. It contains a small sample application:

    https://community.appeon.com/index.php/qna/q-a/how-to-scroll-vertically-on-user-object-using-powerscript

Best regards, John

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 27 June 2024 17:42 PM UTC
  2. PowerBuilder
  3. # 2

Hi Robert;

  This code works for me ...

Int		li_loop
Parent.SetRedraw( FALSE )
FOR li_loop =1 to 20
	Send ( Handle ( Parent ), 277, 3, 0 )
next
Parent.SetRedraw( TRUE )

   The SEND command is sending a mouse click on the Scrollbar like you were requesting a page down. So I added a loop to simulate a page down enough times to get to the bottom of my test window. You may have to adjust the loop count to accommodate your window sizing.

HTH

Regards .. Chris

Comment
  1. Robert Sawyer
  2. Thursday, 27 June 2024 18:28 PM UTC
Thank you all again - this is very helpful.
  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.