07-23-2014 10:11 PM
How can I cahnge Ring item by keyboard input
For example
Ring Initial as follow
Item Value
AA 1
BB 2
CC 3
DD 4
when i choose "BB",then i enter "EE"
Ring will change to
Item Value
AA 1
EE 2
CC 3
DD 4
but everytime I click on Ring,always show the Item List,so that i can't change the value.
I've try "Prompt User",but it will popout a new window,
Thx for your reading, and sorry for my poor english
07-23-2014 11:57 PM
I don't know of any way to do it with a built in feature. But I think this gets your desired functionallity with a combo box...
07-24-2014 12:24 AM
You can easily do that by using the "Strings" property of the Ring control. Select the item you want to replace with a new Item and have the item in a String control. So you can have an update button, once it is clicked use the replace array subset primitive to replace the item with the new one.
07-24-2014 01:04 AM - edited 07-24-2014 01:06 AM
This founction is use for a "Preset model"
Thx for P@Anand 's sugesstion , I've try this way before,
but i perfer to keep current state, cus it's almost out of place for Preset model,so This will be my second choice
Thx for GabeG
I'll try this way,it looks like useful.but can you tell me what's the different between Ring and Combobox
In Ring,when i click,always show the item list,and i can't find any place to type.
But in your sample code there's no prolem like that.
07-24-2014 10:38 AM
The ring controls have a U16 data type. They're generally meant to index a list of real world things, so that you can select array entries using a term that a person would understand as opposed to a number. They work great in state machines to name the different states. Of course they have many properties and can be modified at run time so end up being more flexible than this. The combo box has string data type. Internally they work on key, value pairs that you can access through property nodes. So they are more like a dictionary. They can have a list of pre-defined strings which the user can choose from, but the user can also enter an out of range string. You can leverage this feature to create the control I think you're trying to create, where the pre-defined list can be easily edited by the user, but the user can't enter out of bounds values.
This would make a great X-control which had U16 data type to look like a ring, but have the behaviour you desire!
07-24-2014 11:41 AM
@GabeG wrote:
The ring controls have a U16 data type. They're generally meant to index a list of real world things, so that you can select array entries using a term that a person would understand as opposed to a number.
Not necessarilly. Ring control can have different data type even DBL and also you can set any value to a selection. If you haven't created the Ring control/Indicator don't use it straightaway without knowing the values of the list, since it may not be sequential.
@GabeG wrote:
They work great in state machines to name the different states.
Actually Enumerated data type is generally used in State machines.