From the category archives:

List (Spark)

In a previous example, “Setting the slide duration on a Spark HSlider control in Flex 4″, we saw how you could set the slide duration on a Spark HSlider control in Flex 4 by setting the slideDuration style.

The following example shows how you can set the slide duration on a Spark HScrollBar control in Flex 4 by setting the slideDuration style to control the animated thumb scroll when Ctrl+clicking on the scroll bar track.

[click to continue…]

{ 5 comments }

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.

[click to continue…]

{ 6 comments }

The following example shows 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.

[click to continue…]

{ 1 comment }

The following example shows how you can set the text indent on a Spark List control in Flex 4 by creating a custom item renderer using the RichText control and setting the textIndent style.

[click to continue…]

{ 3 comments }

In a previous example, “Hiding the border on a Spark List control in Flex 4″, we saw how you could toggle the border visibility on a Spark List control in Flex 4 by setting the Boolean borderVisible style.

The following example shows how you can set the content background alpha on a Spark List control in Flex 4 by setting the contentBackgroundAlpha style to a number between 0.0 and 1.0.

[click to continue…]

{ 2 comments }

The following example shows how you can toggle the border visibility on a Spark List control in Flex 4 by setting the Boolean borderVisible style.

[click to continue…]

{ 3 comments }

The following example shows how you can loop through items in a Spark List control in Flex 4 by setting the Boolean arrowKeysWrapFocus property.

[click to continue…]

{ 5 comments }

The following example shows how you can create a fancy Spark List control item renderer by setting the itemRenderer property.

Full code after the jump.

[click to continue…]

{ 3 comments }

Applying styles to specific Spark List controls in Flex 4

by Peter deHaan November 5, 2009

The following example shows how you can selectively style Spark List controls in Flex 4 using Advanced CSS and the styleName property or the id property.
Full code after the jump.

Read the full article →

Setting a custom horizontal scroll bar skin on a Spark List control in Flex 4

by Peter deHaan November 4, 2009

The following example shows how you can apply a custom horizontal scroll bar skin on the Spark List control in Flex 4 by setting the skinClass style.
Full code after the jump.

Read the full article →

Using an XML data provider with the Spark List control in Flex 4

by Peter deHaan November 4, 2009

The following example shows how you can use an XML document as a data provider for a Spark List control in Flex 4 by using an XMLListCollection.
Full code after the jump.

Read the full article →

Styling the horizontal and vertical scroll bars on a Spark List control in Flex 4

by Peter deHaan November 4, 2009

The following example shows how you can set a base theme color on a Spark List control’s horizontal and vertical scroll bar by setting the baseColor style.
Full code after the jump.

Read the full article →