wxPython scrolling question.

Steven W. Orr wrote:

I just discovered Accelerator entries so my wx app is now able to exit by typing Ctrl-Q.

Can someone please tell me what to use to cause a wxGrid to scroll up and down using the middle mouse roller thingy? I looked and found wxCURSOR_MIDDLE_BUTTON but I suspect that's only good for clicking with the middle mouse button. I also found something called WXK_SCROLL, but how do I tell which direction the scroll shoulkd go? Am I way off base?

If your mouse is properly configured on your system then the scroll wheel should already be working in wxGrid. (Because wxGrid derives from wx.ScrolledWinow which has explicit event handlers for the wheel events.) Does the mouse wheel work in other applications?

For future reference, if you ever need to handle the wheel events yourself then you get them with EVT_MOUSEWHEEL and there is info in the event object for finding out the direction, how many scroll units should be scrolled, etc.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!