[Image-SIG] drag/move image from staticBitmap control

Michele Petrazzo michele.petrazzo at unipex.it
Tue Nov 8 13:44:05 CET 2005


James HU wrote:
> Hi, all gurus,
> 
> I have an application to show bitmap image on one wx.staticBitmap 
> control area, I can display part of the image, or the whole 
> image(detail is unclear),
> 
> But I would like to use mouse to drag/move the image inside 
> thewx.staticBitmap control when only part image on the screen, just 
> like maps.google does,
> 
> is it possible to do that?
> 

Yes, but:
like wxstaticBitmap doc say, is not a good idea to use that control to
display an image, because it can have some platform-depended problem.
You can use a wxPanel instead, bind the wx.EVT_PAINT event, and do there
some work.

> Any sample code or any idea or suggestion are appreciated!
> 

Some time ago, on wx list I read that someone do the same and I download
that file. I had looked for that message, but I can't find it, so I
upload on my website that file here:

www.unipex.it/vario/imgview.zip

> BTW, this message posted on other lists as well, nobody reply.
> 
> James

I hope that this can help you,

Michele


More information about the Image-SIG mailing list