LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delete button

                    Hello guys! I need help too. How do I make it so that when I press one of the delete buttons, the record on the respective index in the "Mancare detectata" and "Pret" array is deleted?
Also, I would like the Delete buttons to appear when records appear in the 'Mancare detectata' array(how many records are there, so many delete buttons to have)

0 Kudos
Message 1 of 9
(1,206 Views)

Hi neaua,

 


neaua_daryus@yahoo.com wrote:

How do I make it so that when I press one of the delete buttons, the record on the respective index in the "Mancare detectata" and "Pret" array is deleted?


By deleting the corresponding elements in those arrays! (I guess you hold the data in some shift registers, do you?)

 


neaua_daryus@yahoo.com wrote:

Also, I would like the Delete buttons to appear when records appear in the 'Mancare detectata' array(how many records are there, so many delete buttons to have)


So those buttons should be elements of an array, too. Then you only need to initialize the array for the needed number of elements.

You can set the number of visible elements by using a property node of the array…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(1,199 Views)

I am attaching the picture of the front panel of the VI. How can I make so many Delete buttons appear in my front panel, how many records do I have in the "Food_detected" indicator?
Also, I want that when pressing a Delete button, to delete my registration next to that button, from the "Detected food" indicator and the "Price" indicator

0 Kudos
Message 3 of 9
(1,151 Views)

Make the "Mancare_detectata" and "Pret" items into a Cluster, put that Cluster into an Array control. Now you can right-click and say "delete element" and LabVIEW handles it for you.

0 Kudos
Message 4 of 9
(1,117 Views)

Hello! Can you make me an example with a VI, please?

0 Kudos
Message 5 of 9
(1,101 Views)

Just make an array- all arrays support the right click/delete element thing. Make a cluster by dragging a cluster container out of the palette, then drop in each datatype you want to use. Then plop that into an array.

0 Kudos
Message 6 of 9
(1,085 Views)