LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add items to multicolumn listbox

Solved!
Go to solution

I have a simple VI. I need to add new values without overwriting. So if i click "Pomiar" button - values will be added to multicolumn listbox, then if i click again, values will be added - not replaced. For example:

Click "Pomiar"

1. 3,59

2. 4,56

Click "Pomiar"

3. 3,56

4. 2,21

.

.

.

0 Kudos
Message 1 of 8
(5,249 Views)

You are overwriting your array each time. You need to append the new rows after the previous ones.

Also, do not use local variables, use a shift register to store your array.

0 Kudos
Message 2 of 8
(5,186 Views)

Why this not work? I am trying few hours do this and i cant 😕

0 Kudos
Message 3 of 8
(5,132 Views)

New version. Dont work too.

0 Kudos
Message 4 of 8
(5,128 Views)

Ok I dont know is this success, but maybe. Someone can confirm is this good?

0 Kudos
Message 5 of 8
(5,125 Views)

I am sorry, but there is absolutely no need for the sequence structure (ever!)

The normal way to do it is to have the shift register spanning the entire while loop (since you surely would like to access the data somewhere else, not only when you are adding it. See the attached vi.

0 Kudos
Message 6 of 8
(5,116 Views)
Solution
Accepted by topic author crisdragon

All you need is a shift register containing the 2D string array and a single inner loop. Here's one possible solution.

 


 

 

(If you place the property node before the event structure, you only need one property node. All inner stuff can be done in a single FOR loop. No need for a timeout event. Yes, the sequence structure is completely useless in your code. Use I32 representation for the numeric control, because entering a fractional number would make no sense, Set useful defaults for the controls before saving, etc.)

Download All
Message 7 of 8
(5,109 Views)

This is what i want. Thank you so much 🙂

0 Kudos
Message 8 of 8
(5,053 Views)