Archive for October 2nd, 2008

02
Oct

Using the ZipCodeValidator class to validate US or Canadian zip codes (redux)

In a previous example, “Using the ZipCodeValidator class to validate US or Canadian zip codes”, we saw how you could validate US or US/Canadian zip codes using the Flex ZipCodeValidator class.

The following example shows how you can use the new “Canada only” zip code validator domain type to ensure users only enter a Canadian postal code.

This example requires Flex SDK 3.2.0.3349 or later. To download the latest version of the Flex SDK, see http://opensource.adobe.com/…/flexsdk/Downloads/.

Full code after the jump.

Continue reading ‘Using the ZipCodeValidator class to validate US or Canadian zip codes (redux)’

02
Oct

Adding a horizontal separator to a Flex PopUpButton control’s pop up menu (redux)

In a previous example, “Adding a horizontal separator to a Flex PopUpButton control’s pop up menu”, we saw how you could add a horizontal separator to a PopUpButton control’s pop up menu in Flex by setting the type attribute to “separator” in the menu’s data provider.

The following example shows how you can adjust the amount of empty space around the horizontal separator by setting the Boolean variableRowHeight property.

Full code after the jump.

Continue reading ‘Adding a horizontal separator to a Flex PopUpButton control’s pop up menu (redux)’