LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add text to specified index in multicolumn listbox

Hi!

I have smal problem with multicolumn listbox. My application should create list of values where user can increase and decrease values of 1 or more tester at same time.

e.g when user gives for tester 1 values 1 - 5, my vi creates list where values are displayd like this:

1
2
3
4
5

after that user gives for tester 2 values 5-1 and my vi creates list where values are displayd like this:
1
5
2
4
3
3
4
2
5
1

etc.

First I planned use insert into array function where for 1:st tester row index would be 0,1,2,... and for 2:nd tester row index would be 1,3,5,... etc. One problem in this solution is that if tester 2 have more values than tester 1, there will be left empty rows between values. I planned use string replace to solve that problem, but then I noticed antoher nasty feature of multicolumn listbox.
More serious problem with this structure is, that if tester 2 have more values than tester 1, multicolumn listbox shows only same amount of values than what tester 1 have and rest of values are lost in kyberspace, because in multicolumn listbox values can be added only places where already are values or to last row +1. Do anyone have any ideas how to prevent this or how I should build my VI so I could create test list for testers?
0 Kudos
Message 1 of 5
(3,182 Views)

hi Janne

this is what you can do

First insert tester 2 values into tester 1 values and store the result in a temporary 2 D array.

Next,  just clear your list box, initialise it for the new 2d array size and now put your new table into it

This should do the job.

regards

dev

 

 

0 Kudos
Message 2 of 5
(3,175 Views)
Is't possible to get sample of solution? I'm still quite newbie with LabView. Thanks!
0 Kudos
Message 3 of 5
(3,173 Views)
Find solutions already. I just use array size function and compare result to used array index. If index is larger that size then index will be changed to array size.
0 Kudos
Message 4 of 5
(3,164 Views)

hi Janne.

it took me a while to get back

sorry!

good to know u have been able to solve it!

anyhow, do look this vi  i have attached.  This also takes care of extra elements in the larger array and appends them into the interleaved list box entry.

hope it can be of help to u.

ciao

Devchander

Message 5 of 5
(3,161 Views)