LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
rgvdh@rdf

Move the "radio buttons" control from the "boolean" pallette to the "ring & enum" pallette.

Status: Declined

Any idea that has received less than 7 kudos within 7 years after posting will be automatically declined.

Radio buttons, rings & enums are used for the same basic purpose: to allow a user to choose from a list of named options, giveng the programmer an integer result. When trying out different UI designs I am unlikely to want to swap a radio control for a toggle switch or "OK" button.  I am far more likely to want to swap it for a ring or enum control.

 

Currently, if I replace a menu ring with a text ring or an enum, I'll get a new control with the same number of items and the same item names.  Often no DB editing is needed. 

 

But if I replace one of those with a radio button control, I get a control with two booleans in it, and I have to recreate everything from scratch. 

 

I'd like to be able to replace a ring or enum control with a radio button control and get a radio button control with as many booleans as I had items in the ring or enum, labeled with the item names.  (I'd also like to be able to make that transformation back the other way.)

5 Comments
GregSands
Active Participant

You could also add Tab Controls which are also enums.   I wonder whether it would also be possible to have an Enum TypeDef, and be able to choose to display it on the front panel as either a Ring or Radio Buttons or Tab Control, without having to replace it.

dthor
Active Participant

How would you deal with the "Allow No Selection" radio button option? Include an additional Enum for it? Just ignore that case?

rgvdh@rdf
Member

dthor: I'd say add a new Enum for the "no selection" option.

 

If you look at the output values of a radio control with choices "A" "B" & "C" and "Allow no selection" disabled, then "A"=0, "B"=1 & "C"=2.  When you select "Allow no selection" the assignments change to "No selection" =0, "A"=1, "B"=2 & "C"=3. 

 

If you want to be able replace the above radio button control with an Enum without having to do any BD rewiring or make any change in the sequence of user actions to accomplish a given task, then yes, if "No selection" is enabled you should get an Enum that goes "No selection"=0, "A"=1,"B"=2, "C"=3.

 

With regards to GregS's comment, deciding what should happen when replacing a Ring, Enum or radio button control with a Tab control should also be easy enough.  Going the other way will be more problematic if there's anything in the tabs.  I suppose there could be a dialogue box saying "If you do this you'll lose everything in the tabs."  Or maybe the stuff that was in the tabs should get placed on the front panel somewhere.  This will take thought by someone who is better at UI design than I am.

GregSands
Active Participant

My thought was that it's common to have a typedef enum, and it would be nice to be able to create a Tab Control (or Radio Button) that is still linked to that typedef.  Seems simple Smiley Happy

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 7 kudos within 7 years after posting will be automatically declined.