Tag Archives: ClassFactory

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

Creating an alternating item renderer in a Spark List control in Flex 4 (redux)

In an earlier example, “Creating an alternating item renderer in a Spark List control in Flex 4”, we saw how you could create a custom item renderer in Flex 4 which repositions elements based on the current item renderer’s index in the data provider using the itemIndex property.

The following example shows how you can alternate between two separate item renderers using a custom item renderer function and the getItemIndex() method.

Continue reading Creating an alternating item renderer in a Spark List control in Flex 4 (redux)