From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to append the items form listbox to string array

Solved!
Go to solution

hi,

 

I need help related to listbox

 

 

1. Currently I am able to select item and put into array string

 

Prob is

 

ex.

 

When i select item 1 then Item 1 will be create on arrayString but when I select item 2 and item 3 then arrary string displays item 2 and item 3 and item 1 will be deleted.

 

So please let me know how to add, append and delet from listbox to array string.

 

 

2. How to popup the listbox and allow user to add, delet or append the items in the listbox and transfer to array string

 

I have atatched my code. Please help me.

 

 

thanks,

chethan

 

0 Kudos
Message 1 of 11
(4,215 Views)

@Mandya wrote:

hi,

 

I need help related to listbox

 

 

1. Currently I am able to select item and put into array string

 

Prob is

 

ex.

 

When i select item 1 then Item 1 will be create on arrayString but when I select item 2 and item 3 then arrary string displays item 2 and item 3 and item 1 will be deleted.

 

So please let me know how to add, append and delet from listbox to array string.

 

 

2. How to popup the listbox and allow user to add, delet or append the items in the listbox and transfer to array string

 

I have atatched my code. Please help me.


A picture doesn't really help here.  You need to post the actual VI.

 

If you want to append, then you need some way of retrieving what data is already in there.  A shift register or a local variable should work well for that.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 11
(4,203 Views)

listbox has already have 10 items (strings), when i click on item the corresonding item should be selected and stored in array, my prob is when I try to add second  item after adding first item the arary delets the first item and stores the second item...

 

I need solution in such a way that array has to allow to append , add or delete the item which is selected from the list box....

0 Kudos
Message 3 of 11
(4,180 Views)

@Mandya wrote:

listbox has already have 10 items (strings), when i click on item the corresonding item should be selected and stored in array, my prob is when I try to add second  item after adding first item the arary delets the first item and stores the second item...

 

I need solution in such a way that array has to allow to append , add or delete the item which is selected from the list box....


Yes, I am well aware of what your requirements are.  Now show me what you have done with actual code.  We are not here to do your work for you.  We will help you along.  But just repeating your requirements doesn't help anybody.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 11
(4,169 Views)

I can't disclose entire code...the above req is small part of it.......

 

currenlty i am able to add but not able to append or delete

0 Kudos
Message 5 of 11
(4,162 Views)

Take a look at this code, it allows you to maintain the output array (listbox2) by moving items back and forth between listbox and listbox2. Does this help you in anyway? If not, what additional functionality do you need?

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
0 Kudos
Message 6 of 11
(4,146 Views)

I have labview 2010 and not able to open this file

0 Kudos
Message 7 of 11
(4,141 Views)
Solution
Accepted by topic author Mandya

Sorry, try this:

 

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
0 Kudos
Message 8 of 11
(4,137 Views)

thank you very much...its working

0 Kudos
Message 9 of 11
(4,124 Views)

hi,

 

I have attached the VI and fails to move items from listbox to another listbox.....could you help me...

 

thanks,

chethan

0 Kudos
Message 10 of 11
(4,074 Views)