wxCommandEvent to WxMouseEvent

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
v.maheshbabu
Earned some good credits
Earned some good credits
Posts: 100
Joined: Wed Apr 01, 2009 8:14 pm
Location: Lafayette, Louisiana, United States

wxCommandEvent to WxMouseEvent

Post by v.maheshbabu » Wed Jun 10, 2009 4:35 pm

Is there a way to generate a MouseEvent when a wxButton is clicked?

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria » Wed Jun 10, 2009 5:14 pm

Probably; what's your goal?
"Keyboard not detected. Press F1 to continue"
-- Windows

v.maheshbabu
Earned some good credits
Earned some good credits
Posts: 100
Joined: Wed Apr 01, 2009 8:14 pm
Location: Lafayette, Louisiana, United States

Post by v.maheshbabu » Wed Jun 10, 2009 8:15 pm

I need to call a function continuously when a mouse click on a Button is active. I mean, mouse click on the button isn't released.

But wxButton will call the event only after the mouse click.

vdell
Moderator
Moderator
Posts: 536
Joined: Fri Jan 07, 2005 3:44 pm
Location: Finland
Contact:

Post by vdell » Wed Jun 10, 2009 8:22 pm

You could catch the wxEVT_LEFT_DOWN / wxEVT_LEFT_UP events and check if the button is in the position of the mouse click.

HTH
Visual C++ 9.0 / Windows XP Pro SP3 / wxWidgets 2.9.0 (SVN) | Colligere

Post Reply