LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do we change tree control text

How do I programmatically change the child text in a tree control item?

I see we can add and delete items, I don't see an edit/modify/change method.

   ...Dan
0 Kudos
Message 1 of 13
(3,863 Views)

Using the tree control is a little different than most indicators, you add elements using methods.  Make a reference to the tree control and pass the reference to an invoke node.  You can use either "edit tree>>add item" or "edit Tree->add item to end".  These methods allow for complete control of the item string, parent nodes, text in the columns to the right of the string and even indent position. Hope this helps, I can put together an example if needed but I don't have LV here right now.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 13
(3,843 Views)
Thanks, I know how to add and delete items programmatically using the methods you describe.

How do I modify the items?  Where's the method (or property).  I know how to edit the tag -- but's that's not very useful.

   ...Dan
0 Kudos
Message 3 of 13
(3,839 Views)
I would think you should be able to delete the current tag and re-write add a modified version, but I haven't had to try this yet.  I would think that there is a method for modifying item properties without simply replacing them though.  I will look into this when I get a chance.  Sorry I didn't read your question properly,
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 13
(3,834 Views)
It is not necessary to delete an item and remake it to modify its text. You can directly modify the text for a given item in a tree control by using two property nodes in succession with a tree control reference wired through them. In the first property node input the tag of the item to modify to the Active Item Tag property in the sub-menu Active Item Properties. In the second property node, wire the new text for the item to the Active Cell Properties >> String property to modify it.
Jarrod S.
National Instruments
Message 5 of 13
(3,815 Views)
Good to know, the tree structure is great to use, but is a little more complex than most LV indicators.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 6 of 13
(3,811 Views)
Hi,  I am a novice at programming in LV.  I have LV7.1, is there an example on how to use the tree control.
If there is can someone post it.  Very much appreciated it.
0 Kudos
Message 7 of 13
(3,757 Views)
Hello,
 
There are a couple examples you can start with accessible from the Example Finder.  To find them, launch LabVIEW and click Help -> Find Examples...  When the example finder loads, click the search tab, and type the keyword tree.  The word tree will then show up in the double-click keywords section, and when you double-click it, you'll see two examples in
Best,
JLS
Sixclear
0 Kudos
Message 8 of 13
(3,736 Views)
Hello,
 
There are a couple examples you can start with accessible from the Example Finder.  To find them, launch LabVIEW and click Help -> Find Examples...  When the example finder loads, click the search tab, and type the keyword tree.  The word tree will then show up in the double-click keywords section, and when you double-click it, you'll see two examples in the
Best,
JLS
Sixclear
0 Kudos
Message 9 of 13
(3,737 Views)
(continued from previous post - not sure why it posted prematurely, or why it did so twice)
 
center list section of the example finder called Directory Hierarchy in Tree Control.vi and Family Tree.vi.
 
This should get you started right away!
 
Best Regards,
 
JLS
Best,
JLS
Sixclear
0 Kudos
Message 10 of 13
(3,732 Views)