How to use Enum Values in Radio Groups


A nice feature of radio group buttons in Helm is that you can associate an arbitrary value with each button. Here’s how it works. You can download the example panel from here: RadioGroupEnumValues.

An example

media_1364814523583.png

Here we have a radio group that let’s you select three pre-defined sizes for the text: Small, Medium, and Large. Let’s see how we set that up.

Naming the buttons

media_1364814705248.png

Double-click on the ButtonNames properties to open the Edit List dialog. The button names are entered one per line in the list.

Adding the values

media_1364814911662.png

Double-click the EnumNames property to Edit the values assigned to each button. Here the first button returns 16, the second 24, the third 32, and we’ve set a Property Link to the size of our text object.

Why use this?

Normally radio buttons return the name of the button as the value.This doesn’t always make for a clean interface. The operator needs to see the function of the button, not actual values sent to the device. Using EnumNames gives you a way to separate the name of the button from it’s value and make your panels easier to use.

Tagged with: ,
Posted in HELM, Radio Buttons, Visual Controls