wxListEvent Topic is solved

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
YuMERA
Knows some wx things
Knows some wx things
Posts: 44
Joined: Fri Jul 05, 2019 8:47 pm

wxListEvent

Post by YuMERA »

I have one event ItemSelect function

Code: Select all

OnlcRacunItemSelect(wxListEvent& event)
My question is : How I know what is mouse button is pressed (LEFT or RIGHT) before producing the event?
For example, please.

Thx.
me[R]a
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxListEvent

Post by ONEEYEMAN »

Hi,
What is the exact scenario you are looking for?

Also - why do you need to generate the wxListEvent? They will be generated for your program and your program will need to react to it.

And finally - what exact event you are looking for?

Thank you.
catalin
Moderator
Moderator
Posts: 1618
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Re: wxListEvent

Post by catalin »

YuMERA wrote: Sun Apr 19, 2020 11:53 pmHow I know what is mouse button is pressed (LEFT or RIGHT)
You probably need wxGetMouseState(), then check for left/right button state.
YuMERA
Knows some wx things
Knows some wx things
Posts: 44
Joined: Fri Jul 05, 2019 8:47 pm

Re: wxListEvent

Post by YuMERA »

catalin wrote: Mon Apr 20, 2020 9:00 am You probably need wxGetMouseState(), then check for left/right button state.
Thanks. That is what I need.

Code: Select all

    wxMouseState  mouse_state;
    mouse_state = wxGetMouseState();
    if (mouse_state.LeftIsDown())
    	wxMessageBox("Left click")
Post Reply