LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

event for menu closing?

Is there a way I can detect when a user closes a menu or menu popup?  I would like to shut down other timers in a single-threaded app when the user opens a menu.  But then I need to know when to restart all the timers.

 

0 Kudos
Message 1 of 6
(4,351 Views)

Have you considered creating a variable and updating it in the event callback functions for these buttons, and then using this variable to reset the timers?

0 Kudos
Message 2 of 6
(4,327 Views)

Thanks for the thoughts.  But these are for menus, not buttons.  But I think I see your thought process.  The trouble is, a user has the option of aborting a menu without actually doing a COMMIT of any one menu item.  There doesn't seem to be an event types that account for when a menu is closed.

0 Kudos
Message 3 of 6
(4,291 Views)

If you happen to use Runpopupmenu,  the return value of the function is 0 if no menu item was selected



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 4 of 6
(4,286 Views)

Hmm, that's tempting.  I do use Runpopupmenu, but not exclusively.  So unfortunately, it would be only a half-solution.

 

What I'm really trying to do here is to speed up my GUI during operation.  I really just need to fully commit one of these days and embrace multi-threading in my application.   🙂

 

0 Kudos
Message 5 of 6
(4,266 Views)

For the long term you might want to support and/or modify the suggestion of having a suitable mouse cursor event

Message 6 of 6
(4,259 Views)