win32lib scrollbar bugs
- Posted by daryl_vdb at hotmail.com Feb 01, 2003
- 583 views
This is a multi-part message in MIME format. ------=_NextPart_000_3e97_78a8_5e3d to Derek Parnell (and others) Win32lib seems to have a problem with scrollbars that have long ranges. I have included a small test program which exposes this bug. When the scroll range is set to anything over 65535, win32lib won't let you use the whole scrollbar. Try this for yourself to see what I mean. You can still use the arrows to scroll past 65535, but if you drag the scrollbar and watch the number under it, you'll notice that they skip back to 0. Scrollbars built into windows are even worse. They limit you to 100, which is really rediculous and makes these scrollbars virtually useless. regards, Daryl Van Den Brink ------=_NextPart_000_3e97_78a8_5e3d Content-Type: text/plain; name="Scroll.exw"; format=flowed Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="Scroll.exw" include win32lib.ew constant win1 = createEx(Window, "win1", 0, 0, 0, 400, 270, WS_HSCROLL, 0), lblWinScroll = create(LText, "win1 scroll pos: 0", win1, 0, 200, 100, 30, 0), scrlHScroll = create(HScroll, "", win1, 0, 60, 350, 20, 0), lblHScroll = create(LText, "HScroll pos: 0", win1, 0, 80, 100, 30, 0) setWindowScrollRange(win1, SB_HORZ, 0, 200, 10) setScrollRange(scrlHScroll, 0, 100000) procedure win1_onScroll(integer self, integer event, sequence params) setText(lblWinScroll, sprintf("win1 scroll pos: %d", {getHScrollPos(win1)})) end procedure setHandler(win1, w32HScroll, routine_id("win1_onScroll")) procedure scrlHScroll_onScroll(integer self, integer event, sequence params) setText(lblHScroll, sprintf("HScroll pos: %d", params)) end procedure setHandler(scrlHScroll, w32HScroll, routine_id("scrlHScroll_onScroll")) WinMain(win1, Normal) ------=_NextPart_000_3e97_78a8_5e3d--