LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Ring Controls In Tables Have No Label?

Solved!
Go to solution

Programming a table in CVI, have done it before but not much.

 

Ok, so each item in a normal Ring control has Label | Value | Index associations.

 

When using a Ring embedded in a cell in a Table however, I only see a Value. You can apparently programatically access the index based on that value. Shouldn't there be the same Label | Value | Index for a Ring inside the table?  All you can apply is a Value (which can be a string, huh?). I don't see the reasoning here. It looks like you have to get the index from the "value" and then programatically associate that index with a numeric. Wow how convoluted can you get. 

 

What I want is a ring that has labels of none | 3rd | 6th | 12th that has values of 0, 3, 6, 12 when selecting index 0, 1, 2, 3 respectively.

 

It appears I have to allow the user to select an item from the ring list (the 'value in the setup' dialog box), then get the index from that ring item 'value', then assign a true numeric value based on the index to a variable. Is this correct or am I missing something here?

0 Kudos
Message 1 of 3
(2,857 Views)
Solution
Accepted by topic author scottrod

You are right: rings in table cells miss one element. They only have a value (which actually is a string as you have guessed) and an index. There is no numeric value associated to them. (I personally prefer to consider they actually miss the value and treat them either using the index or using the lable).

Given that using the string values is cumbersome, I normally operate on indexes: if the list of values is built programmatically this is quite sure as using numeric values, you'll only have to be sure new values are added at the end of the list so that old stored parameters are not affected.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 3
(2,821 Views)

Thanks once again Robert. I'm sure there's a good reason for it, but it's a crazy limitation.

 

C'mon CVI team, a little consistency here please.

Message 3 of 3
(2,813 Views)