1. John Raghanti
  2. PowerBuilder
  3. Thursday, 7 May 2020 15:03 PM UTC

Hi all. I've been tasked with creating a smooth scroll on a long composite datawindow. The powers that be don't care for the row by row type scrolling, as some detail rows are much taller than others.

Anyway, I've created an event and associated pbm_vscroll to it, and I can get smooth scrolling to work with some code I found online:

if (scrollcode = 2) or (scrollcode = 3) then
    this.setredraw (false) // Comment this line if You want to see "jumps"
    this.post event ue_post_scroll (scrollcode)
elseif (scrollcode = 5) then
    this.mscroll = scrollpos
end if

However, with this implemented, clicking on the bar itself or on the arrows no longer works. I can't seem to find a reference for what the different scrollcode values mean, or what to expect with scrollpos.

Does anyone have a decent reference for how pbm_vscroll works?

Thanks!

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 7 May 2020 20:03 PM UTC
  2. PowerBuilder
  3. # 1

Hi John;

  What about turning the vertical scroll bar off on the DW Control. Then add a separate Vertical Bar Control right beside the DW Control and then code it to handle the DWC scrolling via ScrollPos() command. I think that might give you the finite control that you might be looking for.

HTH

Regards ... Chris

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Thursday, 7 May 2020 16:30 PM UTC
  2. PowerBuilder
  3. # 2

Greetings, John -

pbm_vscroll is the PB identifier for the Windows WM_VSCROLL message ID. Here is a link to the explanation of WM_SCROLL:

https://docs.microsoft.com/en-us/windows/win32/controls/wm-vscroll

This Microsoft help topic refers to TYPEDEF's constants, which I found by performing a search of C/C++ Header files (*.h files) in the Visual Studio SDK. Their values are as follows:

#define SB_LINEUP 0
#define SB_LINELEFT 0
#define SB_LINEDOWN 1
#define SB_LINERIGHT 1
#define SB_PAGEUP 2
#define SB_PAGELEFT 2
#define SB_PAGEDOWN 3
#define SB_PAGERIGHT 3
#define SB_THUMBPOSITION 4
#define SB_THUMBTRACK 5
#define SB_TOP 6
#define SB_LEFT 6
#define SB_BOTTOM 7
#define SB_RIGHT 7
#define SB_ENDSCROLL 8

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.
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.