Posts by author:

Peter deHaan

The following example shows how you can apply smoothing to a background image fill on an MX Panel container in Flex 3 by extending the BitmapAsset class, setting the Boolean smoothing property, and setting the backgroundImage and backgroundSize styles.

[click to continue…]

{ 0 comments }

The following example shows how you can check whether the user has selected an item in the Spark DropDownList control in Flex 4 by setting the Boolean requiresSelection property to true or using a NumberValidator to check the DropDownList control’s selectedIndex property is greater than -1.

[click to continue…]

{ 1 comment }

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…]

{ 2 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…]

{ 8 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, “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.

[click to continue…]

{ 2 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 }

Using embedded fonts with the MX AdvancedDataGrid control in Flex 4

by Peter deHaan February 24, 2010

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.

Read the full article →

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

by Peter deHaan February 23, 2010

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 [...]

Read the full article →

Listening for a click on the MX MenuBar control in Flex

by Peter deHaan February 19, 2010

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.

Read the full article →

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 →