10-13-2019 09:39 PM
Why is a delete button an indicator? You can't press an indicator, thus it can't fire a value change event.
Buttons should be CONTROLS.
10-14-2019 10:43 AM
I attached a VI. Just give it a try and you will see what I'm talking about. Try to delete every name one by one and you will see that the delete button is not working as it should. What am I doing wrong? I would appreciate it if you attach a VI. I'm more of a visual learner. Also, for your information, I'm new to LabView.
10-14-2019 11:01 AM
Because you are using a tunnel that keeps the original value. You should either use a property node to read the item names inside of the Event Structure or you could keep the current list in a shift register.
10-14-2019 11:19 AM - edited 10-14-2019 11:20 AM
Here's what you should do instead. No need to read the file after writing. (In fact you have a race condition in your code, because there is no guarantee that the reading happens only after writing! You can use the newval event data node in the other event. No need for local variables)
10-14-2019 12:09 PM
Altenbach. Thank you very much. You are the man!!!! You saved my life. I wish I could give you more than just one kudo
10-14-2019 12:15 PM
Altenbach. You made my VI look so bad. You used a few blocks and problem solved.
10-14-2019 12:20 PM
Of course this was a only a very rough draft. You also need:
Deal with the possibility that the drive or file does not exist.
Decide what the value of the listbox should be after deletion. (Probably "no selection").
Implement code to add items,
... Etc.