From the category archives:

beta2

The following example shows how you can create a multiline, justified label on Spark Button control in Flex 4 by creating a custom skin and setting the textAlign style and removing the maxDisplayedLines property.

[click to continue…]

{ 0 comments }

The following example shows how you can create a drop down MX DataGrid control in Flex 4 using the Spark PopUpAnchor control in Flex 4.

[click to continue…]

{ 7 comments }

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 use an embedded font with the MX AdvancedDataGrid control in Flex 4 by setting the embedAsCFF and fontFamily styles.

[click to continue…]

{ 5 comments }

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.

[click to continue…]

{ 0 comments }

The following example shows how you can detect a click on the MX MenuBar control in Flex by using the menuBarItems array and adding an event listener for the click event to a specific MenuBarItem.

[click to continue…]

{ 2 comments }

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

by Peter deHaan February 19, 2010

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.

Read the full article →

Setting a text indent on the Spark List control in Flex 4

by Peter deHaan February 19, 2010

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.

Read the full article →

Programmatically scrolling the Spark TextArea control in Flex 4

by Peter deHaan February 18, 2010

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.

Read the full article →

Listening for the Enter key in a Spark RichEditableText control in Flex 4

by Peter deHaan February 12, 2010

The following example shows how you can detect when the user presses the Enter key in a Spark RichEditableText control in Flex 4 by setting the Boolean multiLine property to false and listening for the enter event.

Read the full article →