Archive for January 6th, 2008

06
Jan

Clearing a selected RadioButton control in Flex

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.

Continue reading ‘Clearing a selected RadioButton control in Flex’

06
Jan

Creating a resizing ToolBar in Flex

The following example shows how you can create a toolbar in Flex by using the ToolBar container which automatically wraps and re-lays out its children when the toolbar is resized. According to the documentation in the class file (see [SDK Directory]\frameworks\projects\framework\src\mx\controls\richTextEditorClasses\ToolBar.as):

The ToolBar container lays out its children in a single horizontal row. If the width of the container is less than the measured width, the children wrap to the next line.
While wrapping, any VRule controls (separators) at the end of a row or the beginning of a row are not drawn.

Full code after the jump.

Continue reading ‘Creating a resizing ToolBar in Flex’