From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

add items to combo box

Hi all,

 

I have a vi that includes a "combo box", "add" and "delete" buttons. You can click the "add" button to add new value to combo box or click the "delete" button to delete a value from it. I have added 1,2,3,4,5 as an example, respectively.


When 3 was deleted, empty string placed instead of 3 (empty string is desired when delete a value).


Now, after deleting, I would like to add new value instead of the deleted value. I mean, for instance i'd like to add 3 again at the its old position (between 2 and 4).


Any idea?

 

Best Regards.

Thanks!
~drycsr~
0 Kudos
Message 1 of 5
(4,213 Views)

You might start running into problems since I don't think you can have multiple combo box entries which are identical.  (i.e. deleting multiple entries will result in multiple empty strings which will be problematic.)

 

Is there a reason why you don't want to just remove the entries instead of replace them?

Message 2 of 5
(4,198 Views)

Would a Text Ring work better than a combo box?

Message 3 of 5
(4,193 Views)

Hi Taki,

 

You're right, i used text ring instead of combo box, text ring more useful and it's very helpful thank you!

 

And as you say, deleting multiple entries will be problematic, i dont notice that 😕  But it is needed that add new value instead of the deleted value. 

 

I'll search/think something else, thank you again..

Thanks!
~drycsr~
0 Kudos
Message 4 of 5
(4,186 Views)

The main idea is, regardless of empty string and duplicates, that you get all the strings/values through a propertiy node, change some through Replace Array and put it back through another property node. 🙂

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 5
(4,172 Views)