Tag Archive for 'buttonbar'

27
Apr

Setting a custom tool tip field on a ButtonBar control in Flex

The following example shows how you can specify a custom field to be used for a tool tip in a Flex ButtonBar control by setting the toolTipField property.

Full code after the jump.

Continue reading ‘Setting a custom tool tip field on a ButtonBar control in Flex’

11
Jan

Setting the data provider of a Flex ButtonBar control to a ViewStack container

The following example shows how you can set the data provider of a ButtonBar control in Flex to a ViewStack container.

Full code after the jump.

Continue reading ‘Setting the data provider of a Flex ButtonBar control to a ViewStack container’

10
Jan

Disabling individual buttons on a Flex ButtonBar control

The following example shows how you can disable individual buttons on a ButtonBar control in Flex by using the getChildAt() method and enabled property on the returned button instance.

Full code after the jump.

Continue reading ‘Disabling individual buttons on a Flex ButtonBar control’

10
Jan

Setting skins on the the Flex ButtonBar control

The following example shows how you can skin the ButtonBar control in Flex by setting the buttonStyleName style and setting one or more of the following skin styles: skin, upSkin, overSkin, downSkin, disabledSkin.

Full code after the jump.

Continue reading ‘Setting skins on the the Flex ButtonBar control’

09
Jan

Creating a custom label function on a Flex ButtonBar control

The following example shows how you can use a custom label function to create button labels on a ButtonBar control in Flex by setting the labelFunction property.

Full code after the jump.

Continue reading ‘Creating a custom label function on a Flex ButtonBar control’

09
Jan

Determining which button was pressed in a Flex ButtonBar component

The following example shows how you can determine which button was pressed in a ButtonBar control in Flex by listening for the itemClick event. You can then use the item, index, or label attribute in the ItemClickEvent object to find out which button was clicked.

Full code after the jump.

Continue reading ‘Determining which button was pressed in a Flex ButtonBar component’

08
Jan

Setting horizontal and vertical gaps between buttons in a Flex ButtonBar control

The following example shows how you can control the horizontal and vertical gaps between buttons in a ButtonBar control in Flex by setting the verticalGap and horizontalGap styles.

Full code after the jump.

Continue reading ‘Setting horizontal and vertical gaps between buttons in a Flex ButtonBar control’

08
Jan

Changing the label placement for a Flex ButtonBar control

The following example shows how you can change the button’s label placement relative to its icon in a ButtonBar control in Flex by using the getChildAt() method and labelPlacement property.

Full code after the jump.

Continue reading ‘Changing the label placement for a Flex ButtonBar control’

07
Jan

Setting the button label text alignment in a Flex ButtonBar control

The following example shows how you can change the text alignment of button labels in a ButtonBar control in Flex by setting the buttonStyleName and textAlign styles.

Full code after the jump.

Continue reading ‘Setting the button label text alignment in a Flex ButtonBar control’

07
Jan

Setting the button corner radius in a Flex ButtonBar control

The following example shows how you can set the corner radius on a ButtonBar control in Flex by setting the buttonStyleName and cornerRadius styles.

Full code after the jump.

Continue reading ‘Setting the button corner radius in a Flex ButtonBar control’

07
Jan

Adding icons to the Flex ButtonBar control

The following example shows how you can add icons to the ButtonBar control in Flex.

Full code after the jump.

Continue reading ‘Adding icons to the Flex ButtonBar control’

02
Jan

Changing the fill colors of a ButtonBar control in Flex

The following example shows how you can change the background fill colors of a ButtonBar control in Flex by setting the buttonStyleName, fillColors, and fillAlphas styles.

Full code after the jump.

Continue reading ‘Changing the fill colors of a ButtonBar control in Flex’

05
Sep

Creating fixed width buttons in a Flex ButtonBar component

The following example shows how you can create fixed width buttons in a Flex ButtonBar component by setting the buttonWidth style. To revert back to variable width buttons, simply set the buttonWidth style to NaN (not a number).

Full code after the jump.

Continue reading ‘Creating fixed width buttons in a Flex ButtonBar component’

20
Aug

Creating a vertical ButtonBar in Flex

This is a simpler version of the “Creating a vertical LinkBar in Flex” entry except it uses the Flex ButtonBar control instead of a LinkBar control. Also, instead of embedding the PNG assets in an <mx:Script /> block, I embedded the images inline using @Embed.

Full code after the jump.

Continue reading ‘Creating a vertical ButtonBar in Flex’