Tag Archives: itemRenderer

Creating a semi-transparent item renderer on a Spark List control in Flex 4

The following example shows how you can create a semi-transparent item renderer on a Spark List control in Flex 4 by creating a custom Spark List skin and a custom item renderer which sets the alpha property on the selected/hovered states.

Continue reading Creating a semi-transparent item renderer on a Spark List control in Flex 4

Preventing the selected item highlighting in the Spark List control in Flex 4

In a previous example, “Preventing item selection in the Spark List control in Flex 4”, we saw how you can prevent item selection in the Spark List control in Flex 4 by listening for the changing event and calling the preventDefault() method on the IndexChangeEvent event object instance.

The following example shows how you can keep List item selection but prevent the selected item highlighting (while maintaining the hover highlight) in the Spark List control in Flex 4 by creating a custom item renderer, setting the autoDrawBackground property to false, and drawing your own highlight in the hover state only.

Continue reading Preventing the selected item highlighting in the Spark List control in Flex 4

Using a CFF embedded font with a Halo DataGrid control in Flex 4

The following example shows how you can use a CFF embedded font with a Halo DataGrid container by setting the itemRenderer property or defaultDataGridItemRenderer style to the mx.controls.dataGridClasses.TLFDataGridItemRenderer class.

Full code after the jump.

Continue reading Using a CFF embedded font with a Halo DataGrid control in Flex 4

Displaying different fonts in a Spark List control in Flex 4

In a previous example, “Displaying different fonts in a dropdown menu on a ComboBox control in Flex”, we saw how you could set different fonts for different items in a Flex ComboBox control’s dropdown menu by using a custom item renderer.

The following example shows you how you can display different fonts for each item in a Spark List control in Flex 4 by creating a custom item renderer.

Full code after the jump.

Continue reading Displaying different fonts in a Spark List control in Flex 4