I'd like to be able to make one of these disappear on right click as well as
left click, but I can't seem to trap an EVT_RIGHT_DOWN event. I thought I
could push the following event handler onto my subclass of
wxPopupTransientWindow:
class TestEventHandler(wxEvtHandler):
def __init__(self):
wxEvtHandler.__init__(self)
EVT_RIGHT_DOWN(self, self.onRightDown)
def onRightDown(self, event):
print "RIGHT DOWN in TestEventHandler"
event.Skip()
But it doesn't see any right down event. For completeness, the start of my
subclass is:
class FixedSplitTreePopup(wxPopupTransientWindow):
I'd like to be able to make one of these disappear on right click as well as
left click, but I can't seem to trap an EVT_RIGHT_DOWN event. I thought I
could push the following event handler onto my subclass of
wxPopupTransientWindow:
The wxPopupTransientWindow pushes some wxEventHandlers onto the child window, and then causes the mouse to be captured by the child window too. So if you change the last line to this it may work:
self.panel.PushEventHandler(TestEventHandler())
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!