01-12-2021 10:49 AM
Hi, I have a MCLB where users enter data into a field and that data is uploaded to the topmost element in the MCLB. Then the next time they enter in data it is uploaded to the next element down and so on. I have a need to programmatically erase a few of the last elements of the Listbox once the user is done for the day. How can I access the last element, and at least five other elements above it, to have them all deleted?
01-12-2021 11:07 AM
The data that goes into the listbox would be stored in an array that you maintain in a shift register between loop iteration.
So if you want to delete elements, then you need to use Delete from Array.
I you need more specific help, then you need to attach your VI so we can see how you are handling things now.
01-12-2021 11:35 AM - edited 01-12-2021 11:36 AM
@ShogunOrta wrote:
I have a need to programmatically erase a few of the last elements of the Listbox once the user is done for the day. How can I access the last element, and at least five other elements above it, to have them all deleted?
01-12-2021 11:49 AM
Okay, I've attached my code as requested. Although, be advised this is a very partial code and will not run on compile. (There were a lot of loose ends I refrained from unsewing from the main program)
Anyway, to point you to the part I am referring to, in the Event Structure go to the tab labeled "Load Log Button 2". What this does is reads from a file, then writes to that file once the user presses the "Button 2". At the end, to the right, is where I was trying to implement my erasure of the last lines of user inputed data in the MCLB.
Sorry if this is too sketchy. I'll attach a tighter version if need be.
01-12-2021 11:59 AM
Clean up the block diagram, it is huge with lots of white space.
Clean up the front panel, it is huge with lots of grey space.
Both take up dozens of screens of space.
I could not find your MLCB on the front panel. It might be there, but the panel was so large, I couldn't find it.
I see added the code like CrossRulze showed. But you used a property node for ItemNames that is not linked to any specific control. That means you would need to wire a reference to a specific control into the upper left of those property nodes. That, or if your control is on that front panel, right click the property node and hit "Link to" and pick your multicolumn list box out of the long list of controls that exist on your front panel.
01-12-2021 01:23 PM - edited 01-12-2021 01:26 PM
NA
01-12-2021 02:05 PM
Thanks for responding, but myself being a rookie Labview developer....
How do you create that I32 bit integer for the multicolumn listbox? I found how to create the 6-Constant with the Delete Array Function, and I've found how to create a local variable for the MCLB, but not that specific integer icon. Is it a part of the 6 Constant? Sorry if this is a very nube question.
01-12-2021 04:02 PM
Who are you talking to? If you responding to a message that goes back a way, use the Quote function in the editor to quote the original message.
What specific integer icon are you talking about?
I would recommend you learn more about LabVIEW from here. How to Learn LV
01-12-2021 05:37 PM
@ShogunOrta wrote:
How do you create that I32 bit integer for the multicolumn listbox?
It is the terminal for the listbox. I just put the listbox on the front panel and then there is magically a terminal for it on the block diagram.