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…]
Tagged as:
Gumbo,
lowerThanMinError,
requiresSelection,
selectedIndex
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…]
Tagged as:
Gumbo,
skinClass,
textAlign
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…]
Tagged as:
autoDrawBackground,
Gumbo,
itemRenderer
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…]
Tagged as:
changing,
Gumbo,
preventDefault()