From the category archives:

ButtonBar

The following example shows how you can set an image background on a Halo ButtonBar control (with default Spark skin) in Flex 4 by setting the buttonStyleName, firstButtonStyleName, lastButtonStyleName, and skin styles.

Full code after the jump.

[click to continue…]

{ 0 comments }

The following example shows how you can style the last button in a Flex ButtonBar control by setting the lastButtonStyleName style.

Full code after the jump.

[click to continue…]

{ 2 comments }

The following example shows how you can set the button height on a Flex ButtonBar control by setting the buttonHeight style.

Full code after the jump.

[click to continue…]

{ 0 comments }

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.

[click to continue…]

{ 0 comments }

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.

[click to continue…]

{ 0 comments }

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.

[click to continue…]

{ 22 comments }

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.

[click to continue…]

{ 8 comments }

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.

[click to continue…]

{ 2 comments }

Determining which button was pressed in a Flex ButtonBar component

by Peter deHaan January 9, 2008

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.

Read the full article →

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

by Peter deHaan January 8, 2008

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.

Read the full article →

Changing the label placement for a Flex ButtonBar control

by Peter deHaan January 8, 2008

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.

Read the full article →

Setting the button label text alignment in a Flex ButtonBar control

by Peter deHaan January 7, 2008

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.

Read the full article →