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 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

Setting a background fill on an invalid Spark Image control in Flex Hero

In a previous example, “Setting the background color on an invalid Spark Image control in Flex Hero”, we saw how you could set the background color on an invalid Spark Image control in Flex Hero by setting the backgroundColor style on the invalid skin state.

The following example shows how you can create a custom bitmap fill on a Spark Image control in Flex Hero by creating a custom skin class and creating a BitmapFill object in the invalid skin state for the background skin part.

Continue reading