开发者

Grid of clickable images in wxPython

开发者 https://www.devze.com 2023-01-10 01:14 出处:网络
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 mou

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)
0

精彩评论

暂无评论...
验证码 换一张
取 消