LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
Dave_Thomson

"Current String" property node for Text Rings

Status: Already Implemented
Functionality already exists with the Ring Text.Text property.

   I've developed a UI technique for creating highly-configurable apps that utilizes a lot of Text Ring controls to allow the user to select from a list of channels or labels or ...  I track the lists of channels, labels, alarms, etc. as the app is configured, and load the Text Rings with them so that the end user does not have to ensure absolutely correct spelling.  Then I convert the text ring to a string value before storing the configuration.  Since the list of channels is so dynamic, it is much safer to save each selected channel as a string than as a position within a list.

   The trick is that when I convert from the Text Ring to the String, I have to use the value of the Text Ring to index an array of all the strings.  Often I keep that array in a handy place, like a shift register, but at times, it is more convenient to read the Strings[] property of the Text Ring itself.  What would be even more convenient would be if there were a "Current String" property that returned the String value associated with the current Text Ring (integer) value.

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
5 Comments
tst
Knight of NI Knight of NI
Knight of NI

I don't have LV open, but I believe the class should have a Text.Text property (or similar) which returns this.


___________________
Try to take over the world!
Darin.K
Trusted Enthusiast

Change 'Text.Text' to 'Ring Text.Text' and tst is exactly right.

Dave_Thomson
Active Participant

Yep, it's there.  Thanks!  Never saw that before.

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
Darren
Proven Zealot
Status changed to: Already Implemented
Functionality already exists with the Ring Text.Text property.
Jandy
Member

Caveat: The ring must be a control or indicator, not a constant in order to set this property node described.