Hi Rob,
thanks for the interesting working example, I’ll have a look at some scrolling functions. - I’d need to adapt them to work with scrolledpanel instead of the ScrolledWindow, but it shouldn’t be that comlicated.
I was hoping a bit, that dragging could be supported somehow natively, but it doesn’t seem to be the case.
Thanks again for your hint,
Vlasta
···
2008/4/19, Rob McMullen rob.mcmullen@gmail.com:
On Thu, Apr 17, 2008 at 8:11 AM, Vlastimil Brom > vlastimil.brom@gmail.com wrote:
I am thinking of emulating this behaviour by computing the
coordinates-changes (mouse, scrolledpanel) and doing the scrollingexplicitely
I got a variation of this to work; instead of dragging, I displayed
crosshairs and wanted to automatically scroll when the mouse pointer
reached the border of the scrolling window.Not exactly the same, but you might be able to adapt this. Basically,
I had to compute the new coordinates of the scrolled panel and call
self.Scroll after the event loop, i.e.:wx.CallAfter(self.Scroll, spx+dx, spy+dy)
See
http://trac.flipturn.org/browser/trunk/peppy/lib/bitmapscroller.py
for a standalone example. There were other complications, but some of
that was due to using an wx.DCOverlay to draw the crosshairs after the
scrolling happened, which you won’t need.Anyway, maybe that will help.
Rob