1. Robert Sawyer
  2. PowerBuilder
  3. Friday, 2 August 2024 15:32 PM UTC

I have a window that contains some objects. When I scroll down, the objects on the window move up (of course). I don't want them to disappear off the top of the window when I get to a certain point. How can I capture the window scroll event so that the objects don't move off the screen when they get to a certain position? When I scroll back up, they can scroll as normal. Or, is there a better solution?

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 2 August 2024 16:29 PM UTC
  2. PowerBuilder
  3. # 1

Hi Robert;

  I suspect that at some point, the App users need to scroll all the way down. So blocking that feature when a certain object get to the top of the Window scrolling area seems to be a weird behaviour to need.

  Why not use two User Objects, DataWindows or one DWO (using a fixed header band of objects not for scrolling) where the "don't let it out of your sight" objects are in one control / area and the all scroll-able objects are in the 2nd control / area. Then only the 2nd control (for User Objects / DC's) is scroll-able leaving the 1st control always viewable (that is, no window scrolling now required.

Food for thought.  HTH

Regards .. Chris

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 2 August 2024 18:19 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Robert -

The functionality of the built-in scroll bars in windows and in user objects can only be customized in a limited manner. This may be why I've never used them in my almost 30 years as a PB developer. I cannot say with certainty that it is not possible to do what you have asked with the built-in scroll bars, but I doubt that it is possible.

In my reply to another question you asked a month ago, I referred you to a different, but similar question where I had provided a small example app that shows one way how this can be done with a custom visual user object and a vertical scrollbar control.

Your earlier question: 
    https://community.appeon.com/index.php/qna/q-a/scroll-position-of-user-objects

The other question that contains the sample app:
    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.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.