LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic Width Control Multicolumn Listbox (Again)

Solved!
Go to solution

Hello,

 

I realize this is a topic that arises from time to time. I have reviewed some of the old posts and imlemented my solution. I am attaching my VI, which is clearly not behaving as it should be.

 

This VI allows one to enter data into the multicolumn listbox. When "run" is hit, the columns should adjust themselves to the width of the text in the boxes. Using the default values, one can see that column0 should be wider than column1. The Widths indicator below the listbox clearly reflects that as well. However, the listbox is not set correctly. What in the world am I doing wrong? This should be so simple.

 

Thanks!

0 Kudos
Message 1 of 4
(3,720 Views)

Sorry, I sent the wrong VI in the previous message. I've updated it.

 

 

0 Kudos
Message 2 of 4
(3,711 Views)
Solution
Accepted by topic author manjagu

Your property node is in the wrong order.  Property nodes execute in order from top down.  You want to set the active cell BEFORE you write the cell width.  The way you have it now, you are setting the new cell width onto the previous column.

 

You will also want to add a small number of pixels to each width.  Because of the internal margin of the cell, the cell width needs to be slightly wider than the actual space the text itself takes up.  Without the extra width, the last character of each cell will get cut off.

 

Message 3 of 4
(3,688 Views)

Thanks. I knew it had to be a misunderstanding on my part.

0 Kudos
Message 4 of 4
(3,639 Views)