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
(725 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
(718 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
(670 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
(636 Views)

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

0 Kudos
Message 5 of 9
(620 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
(604 Views)

I don't want it to work this way. I have an interface with the user and basically he can press one of the "Delete" buttons and delete the respective recording.

0 Kudos
Message 7 of 9
(566 Views)

Hi neaua,

 


neaua_daryus@yahoo.com wrote:

I don't want it to work this way. I have an interface with the user and basically he can press one of the "Delete" buttons and delete the respective recording.


Still it makes sense to define arrays (or arrays of cluster) to easy the implementation.

 

What have you tried so far?

Until now all we got from you are images, but no code…

Best regards,
GerdW


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

Can't you make a cluster that contains the button and the string and make an array of that?  It would then be so simple to program everything...

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 9
(543 Views)