Tag Archives: labelPlacement

Changing the label placement on an MX TabBar control in Flex

In a previous example, “Changing the label placement on an MX ButtonBar control in Flex (redux)”, we saw how you could set the label/icon placement on an MX ButtonBar control in Flex by extending the MX ButtonBar class and setting the navItemFactory property in the mx_internal namespace to a custom class.

The following example shows how you can set the label/icon placement on an MX TabBar control in Flex by extending the MX TabBar class and setting the navItemFactory property in the mx_internal namespace to a custom Tab button class.

Continue reading Changing the label placement on an MX TabBar control in Flex

Changing the label placement on an MX ButtonBar control in Flex (redux)

In a previous example, “Changing the label placement for a Flex ButtonBar control”, we saw how you could change the button’s label placement relative to its icon in a ButtonBar control in Flex by using the getChildAt() method and labelPlacement property.

The following example shows how you can set the label/icon placement on an MX ButtonBar control in Flex by extending the MX ButtonBar class and setting the navItemFactory property in the mx_internal namespace to a custom class.

Continue reading Changing the label placement on an MX ButtonBar control in Flex (redux)

Setting the label placement on a TabNavigator container in Flex

In a previous example, “Setting the label placement on a TabBar control in Flex”, we saw how you could loop over the tabs in a Flex TabBar control and set each tab’s labelPlacement property using the getChildAt() method.

The following example shows how you can loop over the tabs in a Flex TabNavigator container and set each tab’s labelPlacement property using the getTabAt() method.

Full code after the jump.

Continue reading Setting the label placement on a TabNavigator container in Flex

Setting the label placement on a TabBar control in Flex

In a previous example, “Styling individual tabs in a TabBar control”, we saw how you could style individual tabs in a Flex TabBar control by calling the getChildAt() method on the tab bar, and then calling setStyle() on the returned Tab reference.

The following example shows how you can loop over the tabs in a Flex TabBar control and set each tab’s labelPlacement property.

Full code after the jump.

Continue reading Setting the label placement on a TabBar control in Flex

Setting the vertical gap between an icon and label on a LinkButton control in Flex

In a previous example, “Setting the horizontal gap between an icon and label on a LinkButton control in Flex”, we saw how you could set the horizontal gap between the icon and label on a Flex LinkButton control by setting the horizontalGap style.

The following example shows how you can set the vertical gap between the icon and label on a Flex LinkButton control by setting the verticalGap style.

Full code after the jump.

Continue reading Setting the vertical gap between an icon and label on a LinkButton control in Flex

Detecting when the label placement changes on a Button control in Flex

In an earlier example, “Positioning an icon within a button using the Button.labelPlacement property”, we saw how you can set a Flex Button control’s label placement using the labelPlacement property.

The following example shows how you can detect when the labelPlacement property has changed using the labelPlacementChanged event.

Full code after the jump.

Continue reading Detecting when the label placement changes on a Button control in Flex