Quantcast
Channel: SCN : Discussion List - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 2881

Datawindow Scrolling Problem

$
0
0

Why is Object.DataWindow.HorizontalScrollPosition & Object.DataWindow.HorizontalScrollMaximum Integers not Longs?

 

I have a potentially large (horizontally) scrolling app, and was relying on the above two properties to accomplish my needs.

 

If scrolling within an integers range - the properties worked perfectly - more to the point - scrolled precisely to the area defined.

 

The first work-around I tried:

 

CONSTANT Int WM_HSCROLL = 276

CONSTANT Int SB_PAGERIGHT = 3

...

 

Send(Handle(this), WM_HSCROLL, SB_PAGERIGHT, 0)

 

*** Not enough control ***

 

The second work-around I tried:

 

SCROLLINFO scroll_info
Long ll_position
CONSTANT Int SIF_POS = 4
CONSTANT Int SB_HORZ = 0
CONSTANT Int SB_THUMBPOSITION = 4
CONSTANT Int WM_HSCROLL = 276
CONSTANT Long HIWORD = 65536

scroll_info.cbSize = 7
scroll_info.fMask = SIF_POS
scroll_info.nMin = 0
scroll_info.nMax = 0
scroll_info.nPage = 0
scroll_info.nPos = 0
scroll_info.nTrackPos = 0

 

this.SetRedraw(False)

GetScrollInfo(Handle(this), SB_HORZ, scroll_info)

ll_position = scroll_info.nPos

SetScrollInfo(Handle(this), SB_HORZ, scroll_info, True)

Send(Handle(this), WM_HSCROLL, SB_THUMBPOSITION + HIWORD * (ll_position + 25), 0)

this.Object.r_expand.Visible = 1

this.Object.p_exit.Visible = 1

this.SetRedraw(True)

 

*** Better, but not as accurate as HorizontalScrollPosition ***

 

Any other suggestions, or something I missed - Thank you,


Viewing all articles
Browse latest Browse all 2881

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>