LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

clear listbox & auto-arrange line of table

Hi all

May I know how can I clear / empty the listbox which contain data? AND

How can I auto-arrange the column line of the table? because after data are adding into it, user need to manually adjust the width of the column in order to view the full length of data.

THANKS!!!!
0 Kudos
Message 1 of 5
(4,882 Views)
Hi,

to clear a listbox, you have to create a property node (left click on terminal -> creat -> property node)
select "item names" change the item to write and connect a empty string array to it. then it's empty. (Do the same with ItemSymbols if you use them. Set value to 0)

AFAIK there is no way to autoarrange the column width.

Regards,

Rainer
Message 2 of 5
(4,877 Views)
It's a crude solution, but it may work for you.  Use a fixed width font, find the longest string, and use the string length to set the listbox width.  Note, I got some very odd behaivors with width = 0, so I coerced the low end to 20.
Message 3 of 5
(4,860 Views)

Hint:

"Get Text Rect.vi" (on the picture palette) will return a cluster that you can use to determine the actual number of pixels required to display a string.

No guess work required.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 5
(4,857 Views)
Neat!

Message Edited by jasonhill on 02-16-2006 09:04 AM

Message 5 of 5
(4,852 Views)