Hi all,

I am trying to set validators for a set of combo boxes in a form.I am
facing the problem of tabbing n normal mouse events.This is my code:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute" creationComplete="validateText()">


        <mx:Script>
                <![CDATA[
                        import mx.collections.ArrayCollection;
                        import mx.events.ValidationResultEvent;
                        import mx.events.ListEvent;
                        import mx.controls.Alert;
                        import mx.validators.NumberValidator;
                        [Bindable]public var
dataProvider1:ArrayCollection = new
ArrayCollection(["Hello1","Hello2","Hello3"]);


                        public var
mandatoryTextValidator:NumberValidator;


                        public function validateText():void{


                                mandatoryTextValidator = new
NumberValidator();
 
mandatoryTextValidator.lowerThanMinError = "This field is
required";
                                mandatoryTextValidator.minValue = 0;
                                mandatoryTextValidator.required =
true;
 
mandatoryTextValidator.requiredFieldError = "This field is
required";
                                mandatoryTextValidator.property =
"selectedIndex";
                        }


                public function validateComboBox(event:Event):void {
                                mandatoryTextValidator.source =
event.currentTarget;
                                mandatoryTextValidator.validate();


                        }


                ]]>
        </mx:Script>


        <mx:VBox width="452">


        <mx:HBox>
                <mx:Label text="hii"/>
                <mx:ComboBox id="c1" width="100" focusOut
="validateComboBox
(event);" change="validateComboBox(event);"/>
        </mx:HBox>
        <mx:HBox>
                <mx:Label text="hii"/>
                <mx:ComboBox id="c2" width="100"
focusOut="validateComboBox
(event);" change="validateComboBox(event);"/>
        </mx:HBox>


        </mx:VBox>
</mx:Application>


Please help me..........................sam
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to