how to associate events to a image

see this thread for the events problems :wink:
http://article.gmane.org/gmane.comp.python.wxpython/19787

Peter.

路路路

On Fri, 11 Nov 2005 20:37:23 +0200, iuri Matias <iuri.matias@gmail.com> wrote:

hi

how do i associate a event to a image? i tryed :

c = wx.Image(imageFile,wx.BITMAP_TYPE_ANY)
d = c.ConvertToBitmap()id = wx.NewId()
b = wx.StaticBitmap(self, id, d, (10 + d.GetWidth(), 5),
(d.GetWidth(), d.GetHeight()))b.Bind(wx.EVT_MIDDLE_DCLICK,
self.function,id=id)

but nothing happens when i try this event on the image (it works in other
widgets).

whats, the "best" class to use, in order to display a image in a frame, that
can be easily resized, moved, and have events associated with. (i see (too)
many but little examples :expressionless: )