From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RING MENU

Hi!

 

I have a problem with one program. I need to add and delete elements of the menu ring when the program is running. Can i do it? Somebody please help me

0 Kudos
Message 1 of 7
(2,562 Views)

 

You need to use the Strings[] property to change the list of items. Note that we are assuming you're using a menu ring, and not an enum.

0 Kudos
Message 2 of 7
(2,557 Views)

Thanks... Its not what im looking for but it works

0 Kudos
Message 3 of 7
(2,543 Views)

What do you mean it's not what you were looking for? What were you looking for? That's how you set the menu ring's string items.

0 Kudos
Message 4 of 7
(2,512 Views)

Yes but I want to add elemnts when I press a button when my program is running and delete with another button too

0 Kudos
Message 5 of 7
(2,506 Views)

Just place the property in an event for each button.

0 Kudos
Message 6 of 7
(2,494 Views)

I just showed you how to set the items. If you want to change it via buttons then you need to read/write that property node by modifying the array. There is no "add" or "delete" method for the list of items. You have to read the current list, modify it, and then write it back. One simple way is as Dennis suggested and to use an event structure and in each event handler you read the current array, add or delete an element, and then write the new array to the property. Ultimately, though, that property is how you set the elements.

0 Kudos
Message 7 of 7
(2,473 Views)