02-09-2011 08:11 PM
Hello,
I have a simple VI that loads data from a spreadsheet file (in my example it is just a 2D array with some data in it). I want to be able to select a row and add/modify 'notes' (the last column of the listbox). Additionally, when I select any row that already has data in that last column, the program should display that data in the 'notes' string field in such a way that I can edit the notes.
I just cant seem to be able to figure out how to enable both a read and write from the same String control...
Thanks!
-amproctor
Solved! Go to Solution.
02-10-2011 12:14 AM
Can you post your code in LV 2009?
02-10-2011 11:06 AM
2009 Version Attached.
02-10-2011 01:04 PM - edited 02-10-2011 01:12 PM
Here ya go
There may be a better way but this works. You need to use the items property of the listbox. Also, using an event structure could make this cleaner
Edit: Just noticed you can't edit the Notes column in the listbox. Right click the list box and choose "Editable Items". This will allow you to then edit the items. But, my example doesn't work for that so you will need to slightly modify it if you want this capability also.
02-10-2011 01:10 PM
Thanks!
02-10-2011 01:11 PM
See my "Edit" in above post.
02-10-2011 01:12 PM
Correct and non-abusive use of both a sequence structure AND a local variable!
Didn't think I'd live to see the day... ![]()
02-10-2011 01:13 PM
Thanks again, I do not actually want to be able to edit the cell in the listbox, only from the string input window...
02-10-2011 01:38 PM
@cory K wrote:
Correct and non-abusive use of both a sequence structure AND a local variable!
Didn't think I'd live to see the day...
I put the comment in the code about that to avoid the proverbial metaphorical choke slams from other LabVIEW programmers ![]()
02-10-2011 02:01 PM - edited 02-10-2011 02:04 PM
You should really structure the program a bit better using an event structure.
Right now everything is muddied together and you constantly operate on things even if nothing has changed.

Here's a quick draft. modify as needed.