# from Gabor Szabo # on Tuesday 25 August 2009 09:16: >I am playing with an idea for which I need to be able to have >a canvas and move around images either by the mouse (drag-and-drop) >or on their own. > >I could not find an example in the Wx::Demo.
The demo has drag-n-drop for images, but you don't actually want that (clipboard copy+paste) behavior, right? It sounds like you're just looking to reposition an image object on a canvas. If so, you want EVT_LEFT_DOWN() then maybe motion and up events. This example might help: http://svn.scratchcomputing.com/wx_hacks/trunk/bin/cropper What I'm doing there is moving a crop box around on a still image. It sounds like you want exactly that where s/crop box/image/. See also the description here: http://scratchcomputing.com/software/ . --Eric -- As an old bass player friend of mine used to say: throw money, don't clap. --Tony Parisi --------------------------------------------------- http://scratchcomputing.com ---------------------------------------------------
