LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to add and subtract a menubar item dynamically?

I need to check a condition and add or subtract a menubar item containing drop down menu items.  Does anyone know how to do this?  I don't see that there is a menubar attribute for hidden but there is one for dimmed.
Thanks,
Donna
0 Kudos
Message 1 of 2
(2,922 Views)
The cleverest way I know to accomplish what you need is to use InstallMenuDimmerCallback () function in your program. This
callback is executed every time the user clicks on the menu bar but before the menu bar is displayed: this way you dim or enable some menu item depending on particular conditions you find in this moment.
An example on how to use this function: suppose you have a menu with items that refers to a test (setup - start - stop - save test data) and a global variable that holds the "state" of the equipment; in the callback you can dim setup, start and save data items if the test is executing, leaving only the stop option active, or enable save test data only at test completion...


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?
0 Kudos
Message 2 of 2
(2,919 Views)