LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to lock the runtime menu?

Solved!
Go to solution

Hello all!

Is it possbile to lock the (custom) runtime menu when, for example, a triggered loop is running so that the software cannot be left by going to the menu and select "Exit" right in the middle of the loop? The menu related VIs seems to give no control of such kind.

0 Kudos
Message 1 of 16
(2,080 Views)

You can intercept the filter event "Shortcut Menu Activation?" for your control. Watch out for the question mark at the end of the event name. The Discard? terminal on the right side of that event case lets you tell LabVIEW to simply disallow the activation.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 16
(2,054 Views)

Thanks and understood. But this won't lock the menu, only prevent actions. I can still click menu items. OK, better than nothing. 

0 Kudos
Message 3 of 16
(2,031 Views)

Please explain yourself. If you tell LabVIEW to discard the menu event, the menu won't even appear on the screen, so not sure how you even could still select anything in the not available menu.

 

If you only want to disable particular menu items you can do that too. One of the elements on the left event node is the menu refnum. You can use that with the menu control VIs to change the name, disable/enable, checkmark and what else attributes of one or more menu items or even remove items from or add new items to that menu.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 16
(2,020 Views)

@rolfk wrote:

Please explain yourself. If you tell LabVIEW to discard the menu event, the menu won't even appear on the screen, so not sure how you even could still select anything in the not available menu.

 

If you only want to disable particular menu items you can do that too. One of the elements on the left event node is the menu refnum. You can use that with the menu control VIs to change the name, disable/enable, checkmark and what else attributes of one or more menu items or even remove items from or add new items to that menu.


Actually, that doesn't work: You get error 1164 "You cannot modify an application menu item."

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 5 of 16
(1,974 Views)

You can't grey it out, but you can remove it.

dm.png

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 7 of 16
(1,965 Views)

The OP said it was a custom run-time menu, so I assumed they had their own "Exit" item coded in there.

0 Kudos
Message 8 of 16
(1,959 Views)
Solution
Accepted by topic author MaSta

@paul_cardinale wrote:

You can't grey it out, but you can remove it.

dm.png


Sure you can grey it out.

billko_0-1668541182170.png

 

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 9 of 16
(1,955 Views)

@billko wrote:

@paul_cardinale wrote:

You can't grey it out, but you can remove it.

dm.png


Sure you can grey it out.

billko_0-1668541182170.png

 


No you can't.  You get error 1164 "You cannot modify an application menu item."

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 10 of 16
(1,945 Views)