12-20-2011 02:56 PM
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:
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
12-20-2011 04:15 PM
12-20-2011 05:01 PM
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".
12-20-2011 06:30 PM
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.
12-21-2011 06:27 AM - edited 12-21-2011 06:33 AM
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
 
12-21-2011 06:53 AM - edited 12-21-2011 06:55 AM