Tag Archives: selected

Removing the selected highlight from the Spark ButtonBar control in Flex 4 (redux)

In a previous example, “Removing the selected highlight from the Spark ButtonBar control in Flex 4”, we saw how you can remove the selected highlight from the Spark ButtonBar control in Flex 4 by creating a custom ButtonBar and ButtonBarButton skin class.

The following example shows how you can remove the selected highlight from the Spark ButtonBar control in Flex 4 by extending the Spark ButtonBarButton class and creating a custom Spark ButtonBar skin.

Continue reading Removing the selected highlight from the Spark ButtonBar control in Flex 4 (redux)

Creating a toggle button in Flex using the FxToggleButton control

The following example shows how you can create a toggle button in Flex Gumbo using the FxToggleButton control in the latest version (build 4.0.0.3584) of the beta Flex Gumbo SDK.
This example also shows the new Flex Gumbo syntax for two-way data binding:

  • inline: <FxToggleButton id="fxToggleButton" selected="@{fxCheckBox.selected}" />
  • MXML: <Binding source="fxCheckBox.selected" destination="fxToggleButton.selected" twoWay="true" />

Full code after the jump.

Continue reading Creating a toggle button in Flex using the FxToggleButton control

Creating toggle and emphasized Button controls in Flex

Pretty basic stuff, but if you’ve never used a toggle button in Flex or Flash, you may find this useful. The following example creates two Button controls. The first button sets the toggle property to true and determines whether the button is currently selected by watching the button’s selected property. The second button simply sets the emphasized property to true, which gives the button a nice visible border, making it stand out a little more than the other buttons. This is great for highlighting a default button in a form.

Full code after the jump.

Continue reading Creating toggle and emphasized Button controls in Flex