Hi
I'm trying to click and drag a rectangular selection area on a wxFrame, but I don't seem able to capture the mouse button release.
I have tried using EVT_MOUSE_EVENTS and EVT_LEFT_UP, but neither seem to capture the button release. How do I do this?
Phil
Mouse button up events don't seem to work
-
- Knows some wx things
- Posts: 40
- Joined: Mon Jun 09, 2008 9:59 pm
Re: Mouse button up events don't seem to work
I assume there's a wxPanel on the wxFrame? Mouse events don't propagate upwards in the window hierarchy, so you have to catch them in the window you actually click on.
Use the source, Luke!
-
- Knows some wx things
- Posts: 40
- Joined: Mon Jun 09, 2008 9:59 pm
Re: Mouse button up events don't seem to work
Actually I was just rendering directly to the wxFrame. Perhaps this is the problem?
- evstevemd
- Part Of The Furniture
- Posts: 2409
- Joined: Wed Jan 28, 2009 11:57 am
- Location: United Republic of Tanzania
Re: Mouse button up events don't seem to work
Explaining what you are attempting with minimal code helps a lot.philrosenberg wrote:Actually I was just rendering directly to the wxFrame. Perhaps this is the problem?
That being said, do you have any child on wxFrame? Can you add wxPanel to wxFrame and catch events in wxPanel?
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?