Nothing to add
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Do you want an event when your menu is opened? Use
EVT_MENU_OPEN(func)(wxMenuEvent). But it’s not in particular precise. As the documentation says, it is only sent once if you open a menu. For another event you have to close it and open another menu again. I.e in between, you can open other menus (by hovering other items in the menubar), and the event won’t be sent again.What do you need this for? Probably there is another way to do it, instead of listening for this kind of event.
If you want an event for all items of a menu, use
EVT_MENU_RANGE(id1, id2, func)(it’s usingwxCommandEvent). All IDs starting fromid1up to and includingid2will be connected to the given event handler. Using a range instead of connecting each item separate will provide for better performance, as there are fewer items in the event-handler list.