From: Paul W. <pa...@co...> - 2004-10-15 01:54:58
|
Mattia Barbon wrote: > > >>I'm attempting to trap mouse clicks to my application, temporarily >>disabling all mouse clicks (but not movement) for a short period of >>time. Initially I tried to trap all mouse clicks within a >>wxStyledTextCtrl to account for a bug with scintilla which makes a >>segmentation fault when a mouse clicks on a Userlist or autocomplete >>popup. The problem is I can't trap the mouse clicks. >> >> > > When you write: > > >>EVT_LEFT_DOWN( $this, sub { print "Down\n"; } ); >> >> > >do you mean that you actually wrote > >EVT_LEFT_DOWN( $stc, sub { print "Down\n"; } ); >EVT_LEFT_DOWN( $frame, sub { print "Down\n"; } ); > >or you wrote just the latter? If you only used > > > Initially I just wrote the former. I set up two events like u put but only one event is fired, what I am after is if I put the $stc onto $frame and click in the $stc box, I want to intercept and ignore the click (at $frame level for example) before it even gets to the $stc control. Is that possible? I don't understand what u mean about how events not derived from Wx::CommandEvent don't propogating up the window hierarchy :/ Is it possible to ignore clicks some how? I'm trying to localize the click to the frame the $stc is on to trap a bug with the autocomplete popup but if the only way to ignore clicks is to ignore them temporarily for the whole application then that is fine. I thought maybe I could hide the mouse but I can't find any documentation on that. >EVT_LEFT_DOWN( $frame, sub { print "Down\n"; } ); > >you need to be aware that mouse events and any other >event not derived from Wx::CommandEvent do not propagate >up the window hierarchy. > >HTH >Mattia > > Thanks for your response, it is very much appreciated. I just hope I can solve this problem. Regards, -Paul |