Hi guys, need some help here...

 

I have a textInput, and I would like that input like '06' is formatted
to '6'... How do I do this...

 

For the moment I have this : 

 

private function windowWidthTextInputChangeHandler(event:Event):void{

      this.numVTxtWindowSize.listener = this.txtWindowWidth;

      this.numVTxtWindowSize.validate(this.txtWindowWidth);

      this.numFTxtWindowSize.format(this.txtWindowWidth);

}

 

<mx:NumberValidator id="numVTxtWindowSize" 

       property="text" 

       minValue="1" maxValue="10" domain="int"

       exceedsMaxError="The number entered is too large." 

       lowerThanMinError="The number entered is too small."

       allowNegative="false"/>

      

<mx:NumberFormatter id="numFTxtWindowSize"

      rounding="nearest"/>

 

...

 

<mx:TextInput restrict="0-9" id="txtWindowWidth"
change="windowWidthTextInputChangeHandler(event)">

                  

 

Thx!!!

Lieven Cardoen
Application developer

indiegroup
interactive digital experience
engelse wandeling 2 k18 
b8500 kortrijk 

 

 

Reply via email to