LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multicolumn listbox column

Hi,

How can I tell LV to make a multicolumn listbox of two columns? I say it because I go to properties and I set it to 2 but when I resize the width of the multicolumn listbox with my mouse and then I go again to properties it has changed from 2 columns to more columns. Why? and then
if I use export vi strings from menu tools->advanced->export it generates a file and  If you edit this file, you see that it doesn't keep the number of columns I said for my multicolumn listbox.

Thanks,


ToNi.
0 Kudos
Message 1 of 6
(3,585 Views)
The number of columns in the property is only to set the number of columns visible. The other way to change the number of visible columns is by dragging the control with the mouse. They both do the same thing and by setting the column width, that does not disable resizing the listbox by dragging with the mouse. The actual number of columns with data has nothing to do with the number of columns visible. You can have 1 column visible with many columns of data and you could also have many columns visible with data in only 1. If you want them both to be the same, you have to control that with how you're writing data to the listbox.
Message 2 of 6
(3,552 Views)
Hi,

First of all, thanks very much for helping me but I think I didn't explain you my problem very well. That is, I have a multicolumn listbox with two columns, one of them is hidden, the user don't see it, only see one column. My problem is that when I go to Tools->Advanced export, LV generates a file for me, then if you edit this file you can see that LV says my multicolum listbox has three columns and not two why? I don't understand it. It is important to me because each time I open a reference to the vi a use the import VI Strings property method to change de language of my GUI and the first time all go ok but the second time I open my vi it doesn't work.

Thanks,

ToNi.
0 Kudos
Message 3 of 6
(3,532 Views)
Is the problem you're having with exporting the column names of the listbox? If that's the case, I can't reproduce your problem. I start with a new listbox, put a couple of labels in the columns, export that, and only see two columns in the text file. Could it be that at some point you typed information into the third column and then deleted it. If that's the case, then I don't think the column name is truly empty. It has a zero length string in it. One way to check is to use the Column Header Strings property and see what is actually listed in the columns. If you see an empty string (not an null element) in column 3, you can write an array with just two elements to the property to clear it.
0 Kudos
Message 4 of 6
(3,498 Views)
Hello,

I think the reason why the first I open the Vi and use Import VI Strings it works and the second time I open and so on doesn't work. When I run my vi, my listbox has two columns, but one of them  I hide it I open the vi, is it possible the reason because when I open the vi the second time it doesn't work? If so, how can I solve this problem?

Thanks very much,

ToNi.
0 Kudos
Message 5 of 6
(3,469 Views)
Hi Toni, You say you open the file the first time your run the Vi and it goes ok. Then, the second time it doesn´t works. Then it is suppoused u change the file during that. It is not possible your .txt exported file has 2 columns the first time and 3 the second time. If you don't make an export during the first and second time you use the vi your .txt file has to be the same. Check when you export that it has only 2 columns. I have also reproduced your situation and it works ok. Jaime
Regards,

Jaime Cabrera

NI Applications Engineering Spain
0 Kudos
Message 6 of 6
(3,440 Views)