LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to disable runtime menu at startup

Hello:
I'm using a runtime menu and I'm tying to disable and grey items out based on a user level. I've looked at examples and postings and have had no luck.
Thanks
0 Kudos
Message 1 of 4
(3,232 Views)
If you look at the Dynamic Insert Demo.vi example that ships with LabView 6 and 7, you'll see that it uses a function called Set Menu Item Info. It has an input called enable. If enable is False, the item will be grayed-out. Look at the LabView help for Set Menu Item Info.
0 Kudos
Message 2 of 4
(3,232 Views)
Al S:
Thanks for your reply.
What you're saying is that I have to build the menu using the insert menu vis, instead of using the rutime menu file?
Mike
0 Kudos
Message 3 of 4
(3,232 Views)
You can use Set Menu Item Info with items from a runtime menu file. You don't need to insert items programmatically to use Set Menu Item Info. Use the Current VI's Menubar function to get the menubar refnum, then call Set Menu Item Info along with three inputs:
1. The menubar refnum.
2. The item tag for the item to be disabled or enabled. You may need to go back to the menu editor to get the tag, which may or may not be the same as the displayed item name.
3. A boolean wired to enabled.
I referred you to the examples just to see one part of the diagram.
0 Kudos
Message 4 of 4
(3,232 Views)