LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatic Tree Control Selection

I would like to programmatically change a tree's selection but the only related properties I see are "Selection Mode" and "Selection colour" - neither of which seem relevant.

Jordan McBain, PhD
LabVIEW Controls Engineer
Revolutionary Engineering
0 Kudos
Message 1 of 4
(3,350 Views)

The selected element is the value of the tree control. You can use the Value property or create a local variable and write to it. I haven't worked with this recently, but I think the actual value is the tag of the specific row, so that's probably you will have to write.


___________________
Try to take over the world!
0 Kudos
Message 2 of 4
(3,342 Views)

Almost.  What you suggested deals with the active tree element (tree node is contained in a dashed box) not the selection (tree node is contained in a blue box).

Jordan McBain, PhD
LabVIEW Controls Engineer
Revolutionary Engineering
0 Kudos
Message 3 of 4
(3,331 Views)

No, as far as I know, I'm talking about the selection. The active element, I believe, refers to the element you interact with programmatically, but I don't think it has a visual representation in the control. The value of the control is the tag (or probably tags, if you can change it to a multiple selection) of the elements that the user selected (or that you select if you write them to a global).

 

That said, this is without looking at the code. If you don't find that this helps, post some code showing exactly what you're doing and what you're trying to do, so that we have a basis for the discussion.


___________________
Try to take over the world!
0 Kudos
Message 4 of 4
(3,316 Views)