Grid of clickable images in wxPython
So I need to be able to open several images in a grid layout and c开发者_如何学运维lick on the images to perform various actions. Right now I am adding the images to a grid sizer. How do I capture mouse events from a sizer? Or should I display the images in another way to make it easy to respond to mouse events?
Bind one of the mouse events to your images
eg.
your_staticBitmap_object.bind(wx.EVT_LEFT_UP, self.onImageClick, your_staticBitmap_object)
精彩评论