LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tree Control Column resizeing

Hi,
 
I am using LV8 Tree control.
 
Tree control is showing multiple columns where Parent and Child items are listed in the first column. If item name is too long then control is not showing complete name. If I am placing mouse over the item it is showing full name as lable. I dont need this.
 
Is there is any way to change the first column size programatically during run time based on item name size?
 
Thanks,
S.Venkatakrishna
 
 
0 Kudos
Message 1 of 3
(3,523 Views)
Venkat,

If I am understanding you correctly, you would like to resize the column size depending on the name sizes.  Unforutunately, there is no autosize for columns, which would require resizing the entire control for some cases.  There is a way to programmatically resize however.  If you right-click on the tree control and select Create >> Property Node >> Active Cell >> Active Column Number, you can select the column number you wish to change.  In this case it would be column index 0 (remember LabVIEW is zero indexed).  Now resize the property node to add one additional input.  If you select Active Cell >> Cell Size >> Width, you can programmically change the size of the column.  To autosize you would have to detect the number of Child items and resize according to that. 

Hope this helps!
Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 2 of 3
(3,516 Views)

Sorry for the thread resurrection, but the various multicolumn list box topics that are related are not really helping me since I have a tree control.

Doing this will, if the width decreases, show up a multitude of "new" (and empty) columns, or if the width increases, will move the last "real" column out past the border of the control. 

 

Is there an easy solution to this?

(I'm using a Tree control by the way).

QFang
-------------
CLD LabVIEW 7.1 to 2016
0 Kudos
Message 3 of 3
(3,095 Views)