GetScrollPos() of wx.ScrolledWindow reports wrong scrollbar position

Hi
all,

Attached
is the test source code for wx.ScrolledWindow. The test code is just a frame
with the only one child wx.ScrolledWindow.

I handle
EVT_SCROLLWIN event of scrolled window and print the vertical scrollbar
position to the console by GetScrollPos(wx.VERTICAL) function. I see that there
are some strange scroll position outputs:

  • The very first time when the frame is opened (scroll pos = 0), click the
    scroll down button of the scrollbar, the output is 0. I think the correct
    position must be 1?

  • Click several times on the scroll down button, the scrollbar position
    increases accordingly, then click on the scroll up button, the scrollbar
    position keeps increasing by 1, not decreasing???

Is it
a bug of wx.ScrolledWindow, I tested with wxPython 2.8.7.1. Is there a way to
get the correct vertical scrollbar position?

Thanks
in advance for any help or suggestions!!!

Best
regards,

Tai
Tran

test_scrolledwin.py (806 Bytes)