LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to create a checkmark next to a context menu item in a Tree in LabVIEW?

Hello,

I'm creating a custom application where a particular context menu will be shown to the user depending on what item in the Tree they have right-clicked on. One of the items in the menu that I would like to display is essentially a "Disable" option. I'm looking for a way to show the user the current state of this Disable option by providing a checkmark next to it if they have already clicked it for a particular item in the tree. Here's a screenshot of a similar checkmark from the LabVIEW dev environment drop-down menus:

 

checkmarkLabVIEW.jpg

 

Does anyone know if it is possible to create a context menu with a checkmark like the one above in a Tree in LabVIEW? I've tried searching the web and here in the NI forums but without much luck. Thanks!

 

Lars L

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

http://lavag.org/topic/1113-listbox-symbols/

 

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

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

Also in the LabVIEW Help: Fundamentals -> Building the Front Panel -> How-To -> Front Panel Controls and Indicators -> Listboxes, Tree Controls, and Tables -> Adding Symbols to Listboxes and Tree Controls.

 

Found by: Opening LabVIEW Help and entering "tree" on the index tab. Second item under "tree controls".

Message 3 of 6
(4,240 Views)

Assuming the problem is putting a checkmark in the context menu as opposed to the Listbox itself, it is going to be a difficult proposition. 

 

You could try using * or ./ instead of the checkmark character (pad the other menu item names with spaces).  The second one is not as bad as you might think, especially considering the alternative is delving into .NET or rethinking your UI concept.

Message 4 of 6
(4,233 Views)

Wow, I know this one!

 

I used it a couple of years ago (LV 8.6)

 

There is an option to "Set Menu Item Info" that allows you to set the check for a context menu item.

 

http://zone.ni.com/reference/en-XX/help/371361H-01/glang/set_menu_item_info/

 

 

 

I used it in my Tree

 

 ContextMenuChecked.PNG

Message 5 of 6
(4,215 Views)

You're right.  And when you're right, you're right.  And you, you're always often right!  🙂

 

Untitled 1.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 6 of 6
(4,209 Views)