LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tree columns autofit in Tree

Hello Everyone,
 
        I need to adjust my columns in a tree such that, all the unused columns (which has empty header strings and they are present only at the end) should be deleted and that, the columns should exactly fit my tree. How can I implement this?
 
Thanks,
Vasanth.
Ya Ya
0 Kudos
Message 1 of 8
(3,546 Views)

Vasanth,

Here is a down and dirty version to get you started.  There is a slight flicker in the beginning that may be fixed with property node order, but I will leave that to you.

Chris Co

0 Kudos
Message 2 of 8
(3,534 Views)
Thanks Chris,
 
           That is what exactly I wanted. I will take care of that flicker problem.
 
Thanks,
Vasanth.
Ya Ya
0 Kudos
Message 3 of 8
(3,532 Views)
Chris,
 
       But it is not deleting any extra columns. It is just adjusting the display such that the needed columns are visible.
 
-Vasanth.
Ya Ya
0 Kudos
Message 4 of 8
(3,528 Views)

I'm not sure what you mean.  What are you using the tree for and why do you want to delete?  Do the columns you want deleted have data in them?  If they are blank and you want to prevent a user from seeing a column, just right click tree and choose moveable column seperators. This will prevent any acess to resize the columns at runtime.

Chris Co

0 Kudos
Message 5 of 8
(3,519 Views)

I don't mean to barge in, but here's a little bit of code that will autosize the columns without resizing the whole table. Also, you can't really delete columns, hiding them is what you want. The actual value that you'll read from the tree is just the tag from the first column, so any subsequent columns will only display what you put in them.

Message Edited by Marc A on 01-05-2007 09:28 AM

0 Kudos
Message 6 of 8
(3,508 Views)

Sorry for not making the question clear. I hereby have attached the sample image of what I want. The first tree has some empty columns. When I run the vi, the tree should resize so as to hide the empty columns.

Ya Ya
0 Kudos
Message 7 of 8
(3,488 Views)
Overall, I wanted to know how to delete a column from a tree. I think that will take care of what I actually wanted :-).
Ya Ya
0 Kudos
Message 8 of 8
(3,487 Views)