03-02-2016 06:46 AM
Hi,
There seems to many posts on deleting rows from multicolumn listbox programmatically but not from single column listboxes.
Woth the help of Blokk and GerdW, helped me to build a subset of a listbox with the elements clicked in a reference list box
Make an array of the items clicked in a list
. How do we add a feature of deleting just incase rather than clearing the whole list and doing it all over again.
Thanks in advance.
Solved! Go to Solution.
03-02-2016 06:54 AM
Have an array of strings for the 'ItemNames' that go into the listbox and store it on a shift register. When you delete an item (e.g. from an event case), remove that item from the list (using delete from array) and write it back to the ItemNames property of the listbox. A single column listbox works in exactly the same way as a multicolumn listbox.
(excuse the broken links to the properties - this happens when creating a snippet)
03-02-2016 07:21 AM
Thank you so much Sam_Sharp. You've given me more insight into how to use Listbox.
May I ask why do you have the error out connected to the while loop?
03-02-2016 07:29 AM
03-02-2016 07:52 AM
@Sam_Sharp wrote:
(excuse the broken links to the properties - this happens when creating a snippet)
Use the Code Capture Tool rather than NI's built in VI snipped option and you won't have that problem.
03-02-2016 08:54 AM
@RavensFan wrote:
@Sam_Sharp wrote:
(excuse the broken links to the properties - this happens when creating a snippet)
Use the Code Capture Tool rather than NI's built in VI snipped option and you won't have that problem.
Yes, although I have noticed that NI did apparently fix these issues with LV 2015 (but the CCT still has some advantages, like including the FP in the image or backsaving the snippet).