05-29-2011 12:05 PM
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
05-29-2011 12:40 PM
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.
05-29-2011 06:21 PM
Thanks... Its not what im looking for but it works
05-30-2011 04:05 PM
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.
05-30-2011 07:30 PM
Yes but I want to add elemnts when I press a button when my program is running and delete with another button too
05-30-2011 09:04 PM
Just place the property in an event for each button.
05-31-2011 09:12 AM
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.