Monthly Archives: February 2010

Setting the slide duration on a Spark HScrollBar control in Flex 4

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.

Continue reading Setting the slide duration on a Spark HScrollBar control in Flex 4

Removing the sort arrow skin from an MX DataGrid control in Flex

In a previous example, “Changing the default sort arrow skin on a Flex DataGrid control”, we saw how you could change the sort arrow skin on a DataGrid control in Flex by setting the sortArrowSkin style.

The following example shows how you can remove the sort arrow skin from an MX DataGrid control in Flex by setting the sortArrowSkin style to the mx.skins.ProgrammaticSkin class.

Continue reading Removing the sort arrow skin from an MX DataGrid control in Flex

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

Setting the font weight on the MX Legend control in Flex 4

In a previous example, “Setting the font weight on a charting Legend control in Flex”, we saw how you could set the font weight of a Flex Charting Legend control by setting the fontWeight style on the LegendItem CSS selector.

The following example shows how you can set the font weight of an MX Legend control by setting the fontWeight style on the LegendItem CSS selector in Flex 4.

Continue reading Setting the font weight on the MX Legend control in Flex 4

Setting a variable row height on an MX MenuBar control in Flex

The following example shows how you can set a variable row height on an MX MenuBar control in Flex by listening for the menuShow event, setting the Boolean variableRowHeight property on the MenuEvent object’s menu property, and then calling the invalidateSize() method.

Continue reading Setting a variable row height on an MX MenuBar control in Flex

Programmatically scrolling the Spark TextArea control in Flex 4

The following example shows how you can programmatically scroll the Spark TextArea control in Flex 4 by setting the vertical scroll position on the horizontal and vertical scroll bars in the scroller, horizontalScrollBar, and verticalScrollBar skin parts.

Continue reading Programmatically scrolling the Spark TextArea control in Flex 4