To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This is a simple example to add items to a listbox dynamically / programmatically.
Description
Ever needed to add items to a listbox in LabVIEW dynamically / programmatically? Here's some example code that shows how it could be done!
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Snippet
**This document has been updated to meet the current required format for the NI Code Exchange.**
Regards,
Imtiaz Chowdhury
Project Manager
Green Running / Austin Consultants
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
True, post is old, but it does what I was looking for. My problem is that I cannot create something that works the same. I can copy of course and it works fine, but not from scratch. If somebody stumbles across this can you explain how the "+add a new one..." portion of this works? How can I create it from scratch?
Robert
That section just makes the string control and ok buttons visible when the "+add a new one..." is selected. It is just using a property node to get the available strings from the listbox and then array size to get the number of elements in the listbox. If the final value is selected, the other controls become visible (again, just property nodes to the other controls). What part of it do you not understand how to create?
Must be the day I am having. I have created 4 versions now and all work as they should. I don't know why it would not work the first few times I tried it. What would happen is when I clicked on the last item the string control and OK boolean would pop up, the immediately go invisible again as if another action had occured. Not sure why that was happening though. Thanks for the quick response though.