From the category archives:

RadioButtonGroup

The following example shows how you can detect when the number of RadioButton objects changes in a RadioButtonGroup in Flex by listening for the numRadioButtonsChanged event.

Full code after the jump.

[click to continue…]

{ 0 comments }

In a previous example, “Enabling and disabling RadioButton controls in a RadioButtonGroup in Flex”, we saw how you can enable or disable all of the RadioButton controls in a Flex RadioButtonGroup by setting the enabled property.

The following example shows how you can detect when the enabled property changes by using the enabledChanged event.

Full code after the jump.

[click to continue…]

{ 0 comments }

The following example shows how you can disable keyboard navigation within a Flex RadioButton/RadioButtonGroup by extending the RadioButton class and overriding the protected keyDownHandler() method.

Full code after the jump.

[click to continue…]

{ 0 comments }

The following example shows how you can detect when a RadioButton has been clicked in a FlexRadioButtonGroup by listening for the itemClick event.

Full code after the jump.

[click to continue…]

{ 0 comments }

The following example shows how you can loop over the RadioButton controls in a Flex RadioButtonGroup by using the numRadioButtons property and getRadioButtonAt() method.

Full code after the jump.

[click to continue…]

{ 0 comments }

The following example shows how you can set the visibility of all of the RadioButton controls in a Flex RadioButtonGroup by setting the enabled property.

Full code after the jump.

[click to continue…]

{ 0 comments }

The following example shows how you can set the label placement on a series of RadioButton controls in a Flex RadioButtonGroup by setting the labelPlacement property.

Full code after the jump.

[click to continue…]

{ 0 comments }

The following example shows how you can display a series of RadioButtons using the Flex Repeater with an Array data provider.

Full code after the jump.

[click to continue…]

{ 0 comments }

Clearing a selected RadioButton control in Flex

by Peter deHaan January 6, 2008

The following example shows how you can use ActionScript to clear a currently selected radio button by setting the RadioButtonGroup class’s selection property to null.
Full code after the jump.

Read the full article →

Determining when the selected radio button has changed

by Peter deHaan October 19, 2007

The following examples show how you can detect when the user has selected a different radio button by listening for the change event on the RadioButton control or RadioButtonGroup control.
Full code after the jump.

Read the full article →

Creating a simple multiple-choice quiz using the RadioButton and RadioButtonGroup controls

by Peter deHaan October 17, 2007

The following example shows how you can make a very simple multiple-choice type quiz using the RadioButton and RadioButtonGroup controls. Each time you make an incorrect choice and click the check answers button, the selected (incorrect) choice is removed from the Flex application. If you select the correct answer and click the check answers button, [...]

Read the full article →