Flex/AS3 Custom ComboBox for Canada provinces with XML

Here's the Canada version.

Flex Canada Provinces Custom ComboBox


package com.imageMEDIA {
    import mx.controls.ComboBox;

    public class ComboBox_States_CA extends ComboBox {

        private var statesCA:XML=new XML(<states><state value="AB" label="Alberta" country="CA" /><state value="BC" label="British Columbia" country="CA" /><state value="MB" label="Manitoba" country="CA" /><state value="NB" label="New Brunswick" country="CA" /><state value="NL" label="Newfoundland and Labrador" country="CA" /><state value="NT" label="Northwest Territories" country="CA" /><state value="NS" label="Nova Scotia" country="CA" /><state value="NU" label="Nunavut" country="CA" /><state value="ON" label="Ontario" country="CA" /><state value="PE" label="Prince Edward Island" country="CA" /><state value="QC" label="Quebec" country="CA" /><state value="SK" label="Saskatchewan" country="CA" /><state value="YT" label="Yukon" country="CA" /></states>);

        public function ComboBox_States_CA() {
            dataProvider = statesCA..state;
            labelField = '@label';
        }

        

    }
}

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
BlogCFC was created by Raymond Camden. This blog is running version 5.9.1.001. Contact Blog Owner