LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Single column Listbox - Dynamic manipulation

Solved!
Go to solution

I would like to dynamically insert and remove elements from a single column listbox and also limit the total number of entries to 16.

 

I have done most part, but I'm stuck at the logic of limiting the maximum number of entries to N. The problem is, once the user enters 16 entries, the ADD button is disabled. But even after I delete some older entries using the DELETE logic to free up some space on the listbox, I would like the ADD button to automatically be re-enabled. How do I do this ??

 

EDIT: I figured it out. However, I am not sure if this is the most efficient method to achieve what I am trying to do here. Attached is the updated VI as well.

 

7BYERxh

NI System Configuration:
- NI PXIe-1071, 4-Slot 3U PXI Express Chassis , 1 GB/Slot throughput, Part Number: 781368-01
- NI PXIe-PCIe8381,x8 Gen2 MXI-Express for PXI Express Interface,3m, Part Number: 782522-01
- PXIe-5160 PXI Oscilloscope, 500 MHz, 10 bits, 2.5 GS/s, 2 Channels, 64 MB, Part Number: 782621-01
- Astronics PXIe-1209 2-Channel, 100 MHz PXI Pulse Generator, Part Number: 785033-01
Download All
0 Kudos
Message 1 of 3
(1,940 Views)
Solution
Accepted by topic author asukumari

I can't open your file but I assume you have a delete button with an associated event.  Enable the add button in that event if the number of items is less than 16.  You also probably want to consider disabling the delete button if there are no items, if nothing else, for the sake of UI continuity. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 3
(1,929 Views)
Exactly what I did. I will add the disabling of the DELETE button as you said. It makes more sense.

Thanks !
NI System Configuration:
- NI PXIe-1071, 4-Slot 3U PXI Express Chassis , 1 GB/Slot throughput, Part Number: 781368-01
- NI PXIe-PCIe8381,x8 Gen2 MXI-Express for PXI Express Interface,3m, Part Number: 782522-01
- PXIe-5160 PXI Oscilloscope, 500 MHz, 10 bits, 2.5 GS/s, 2 Channels, 64 MB, Part Number: 782621-01
- Astronics PXIe-1209 2-Channel, 100 MHz PXI Pulse Generator, Part Number: 785033-01
0 Kudos
Message 3 of 3
(1,923 Views)