Do you have to do anything beyond
EVT_LEFT_DOWN(self, self.OnButton)
to catch a left mouse click in a frame? I have a frame with nothing but a
menubar and a wxTextCtrl, and it doesn't seem to be picking up the mouse
clicks.
That should work fine.
I had some trouble where I put a button in a sizer on a panel, but set the
parent to the frame! That button didn't click.
GBU
Matthew Sherborne
···
----- Original Message -----
From: "C. Porter Bassett" <porter@et.byu.edu>
To: <wxpython-users@lists.wxwindows.org>
Sent: Thursday, March 14, 2002 5:58 PM
Subject: [wxPython] mouse events on frames
Do you have to do anything beyond
EVT_LEFT_DOWN(self, self.OnButton)
to catch a left mouse click in a frame? I have a frame with nothing but a
menubar and a wxTextCtrl, and it doesn't seem to be picking up the mouse
clicks._______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users
Do you have to do anything beyond
EVT_LEFT_DOWN(self, self.OnButton)
to catch a left mouse click in a frame? I have a frame with nothing but a
menubar and a wxTextCtrl, and it doesn't seem to be picking up the mouse
clicks.
Mouse events are not command events so the are only sent to the window that
they happened in. In your case if you click in the wxTextCtrl then it is
the one that will get the event. If you bind your event handler to it
instead of the frame then it will be called.
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!