12-18-2023 01:12 PM
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)
12-18-2023 01:32 PM
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…
12-19-2023 11:27 AM
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
12-19-2023 12:52 PM
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.
12-19-2023 01:37 PM
Hello! Can you make me an example with a VI, please?
12-19-2023 02:25 PM
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.
12-20-2023 06:22 AM
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.
12-20-2023 07:04 AM - edited 12-20-2023 07:05 AM
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…
12-20-2023 10:02 AM
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...