LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to lock the runtime menu?

Solved!
Go to solution

@billko wrote:

@paul_cardinale wrote:

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

dm.png


Sure you can grey it out.

 

 


Paul's earlier post was saying that you can TRY to do this, but you can't actually do it to an application menu item, as it returns error code 1164. My post was referring to that item since the OP said it was a custom run time menu.

0 Kudos
Message 11 of 16
(852 Views)

Which LabVIEW version is that? We talk about a control pop-up menu, right? I would be flabbergasted if that doesn’t suddenly work anymore, the latest time I did conditionally discard that event and modify the menu was in an application in 2018 that I just recently revisited and it definitely works and has done so since the event structure supports menu events.

 

If you talk about the window menu as your later code example shows you can only change the menu if you use a custom menu, not the default menu. This is because the default menu only exists once and is reused in every VI that does not use a custom menu.

Rolf Kalbermatter
My Blog
0 Kudos
Message 12 of 16
(842 Views)

@BertMcMahan wrote:

@billko wrote:

@paul_cardinale wrote:

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

dm.png


Sure you can grey it out.

 

 


Paul's earlier post was saying that you can TRY to do this, but you can't actually do it to an application menu item, as it returns error code 1164. My post was referring to that item since the OP said it was a custom run time menu.


If that didn't work, a lot of applications that I made wouldn't work.  So in conclusion, I must've totally misunderstood the issue.

 

Edit: I assumed we were talking about custom menu items.  It never occurred to me to try to disable an application item in a custom menu.

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.
0 Kudos
Message 13 of 16
(817 Views)

Thanks to all.

Actually, I already found the menu item settings VI, but I was looking for a simple way to lock the entire menu at once. Setting single menu items to deactivated, which means grayed out, works. 

0 Kudos
Message 14 of 16
(787 Views)

In my humble opinion, it is better to grey out a menu item rather than removing it, or even worse, making the menu not available at all. With a greyed-out item the user knows that the item is not available. Making the menu not available at all, user might just think that he did not click at the right time or spot, that there is a bug, etc...

Marc Dubois
0 Kudos
Message 15 of 16
(764 Views)

Right, that's what I did. Gray out.

0 Kudos
Message 16 of 16
(757 Views)