[wxPython] drag canvas (bitmap on canvas)

Hi folks, (robin,cliff) ;o)

I want to write a function to zoom and drag my canvas (similar to Photoshop's "Hand-Tool".

I think I use sliders for the zoom-factor (so I got x and y for SetUserScale or something like that) but then .... I got no idea how to handle a drag-funtion which allows to scroll my picture (on my canvas) with pressed mouse button.

Does anyone know what wxPython-Function could help me??

Thank you for makeing thoughts about my problems!!
Stefan

···

______________________________________________________________________________
Flug.de - 570.000 Nutzer, ein Ziel: der optimale Flug
http://flug.de/sb/?PP=0-5-100-105-12

Hi folks, (robin,cliff) ;o)

I want to write a function to zoom and drag my canvas (similar to
Photoshop's "Hand-Tool".

I'm not familiar with Photoshop - you mean you want to scroll your canvas by
dragging on it with the mouse? You might try wxScrolledWindow (using it as
the canvas) and then invoke it's Scroll() method when the user drags on the
window.

···

On Tuesday 11 September 2001 11:05, Stefan Schubert wrote:

___________________________________________________________________________
___ Flug.de - 570.000 Nutzer, ein Ziel: der optimale Flug
Billige Flüge buchen | weltweit billig fliegen | flug.de

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

--
Cliff Wells
Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308
(800) 735-0555 x308

I got no idea how to handle a drag-funtion which allows to
scroll my picture (on my canvas) with pressed mouse button.

You need to set handlers for the basic mouse events, and then when dragging
you can manipulate the scrollbars of your wxScrolledWindow. A scroll event
will be generated followed by a paint event. You paint handler should be
optimized to only redraw what is required.

···

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