Friday, December 2, 2005, 12:11:13 PM, Rob Brooks wrote:
is there a way to find out what event spawned another event?
I'm afraid this question hasn't an answer (you asked about
separating/filtering/handling EVT_TREE_SEL_CHANGING and EVT_RIGHT_DWN
in a wx.TreeCtrl; Yuan Hong asked here sometime ago about separating
EVT_GRID_LABEL_LEFT_CLICK and EVT_GRID_CL_MVE; I have asked here
about separating EVT_MVE and EVT_SIZE and also single clicks/double
clicks.)
But perhaps this could be done this way:
- Initialize (False) some variables on __init__, say,
self.sel_changing and self.right_down;
- Bind EVT_TREE_SEL_CHANGING and EVT_RIGHT_DWN to handlers that
actually do nothing but set self.sel_changing and
self.right_down to True whenever they are fired.
- Bind EVT_IDLE to a handler that check the states of self.sel_changing and
self.right_down, decide what is the logic to follow based on the
states, reset (False) self.sel_changing and
self.right_down and finally executes the logic.
-- tacao
No bits were harmed during the making of this e-mail.
To unsubscribe, e-mail: wxPython-users-unsubscribe (AT) lists (DOT) wxwidgets.org
For additional commands, e-mail: wxPython-users-help (AT) lists (DOT) wxwidgets.org