- Subbiya Vasumoorthy
- PowerBuilder
- Tuesday, 30 April 2024 01:57 PM UTC
Hi Team,
Need help on scrolling user object based on row selection.
In a window, I have a datawindow on the left side. On the right side, I have a user object(container for user object) inherited from u_base. I have opened several user objects one by one(using x, y position) on inside the user object which is placed on the right side. The no. of user objects opened on the right side is based on the row clicked on the left side dw.
Opening the user object and scrolling through scroll bar on the right side was good. The only issue is, I am not able to scroll to a specific position inside the user object. I have the Y position and height of each user object opened inside the container.
I tried the following steps to manually scroll the user object.
- I created an event in the user object container with event id pbm_vscroll, and executed it using scrollcode(2 or 3) and with scrollpos
- Created an local external function for SetScrollPos from USER32.DLL
- SetScrollPos(Handle(uo_container_emr_scroll), -2, ll_temp_scroll_pos, true
- Tried scrolling using send function
- Send(Handle(this), 277, 1, 0) - using this I was able to scroll SB_LINEDOWN, SB_LINEUP, SB_TOP, SB_BOTTOM,... but not to the exact position where I was scroll.
My questions are,
- How can i get the exact scroll position of the start of the user object opened inside a container, can i refer the Y position or Y + height of previous opened user obejct ?
- Even If i got the exact scroll position, how should I have to use it.? using send or any windows API. ?
Thanks,
Subbiya
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.