wxpython bind mouse events to all panels? -


hey im looking way bind mouse event panels. im using wx.window.findfocus() find panel has focus in app of many panels. problem want bind wx.left_down event put wx.window.findfocus() in event handler. bind tho? self, panel1, panel2 wont work cos itll call event when clicking on panel. need catch clicks in anypanel can determine panel has focus? pls help!!!

if wx.panel has children widgets can accept focus, set focus first child can take it. means wx.panels don't focus unless set explicitly...

if need catch clicks on panel, bind wx.evt_left_down event panels this:

panelone.bind(wx.evt_left_down, self.dosomething)

i think can use hittest figure out clicked on, if that's necessary. heck, can find out panel doing in event handler:

panel = event.geteventobject() panel_id = panel.getid() panel_name = panel.getname() 

hope helps!


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -