         {
             textInput.focusEnabled = false;
             textInput.maxChars = _maxChars;
-            // restrict to digits, minus sign, decimal point, and comma
+            // Restrict to digits, minus sign, decimal point, and comma
             textInput.restrict = "0-9\\-\\.\\,";
             textInput.addEventListener(FlexEvent.ENTER,
                                        textInput_enterHandler);
+            textInput.addEventListener(FocusEvent.FOCUS_OUT, 
+                                       textInput_focusOutHandler); 
             textInput.text = value.toString();
+            // Set the the textInput to be wide enough to display
+            // widest possible value. 
+            textInput.widthInChars = calculateWidestValue(); 
+            
         }
     }
     


import flash.display.DisplayObject;
import flash.events.Event;

import mx.events.FlexEvent;
import mx.managers.IFocusManagerComponent;

    
    //--------------------------------------------------------------------------
    //
    //  Overridden Properties: FxRange
    //
    //--------------------------------------------------------------------------
    
    //---------------------------------
    // maximum
    //---------------------------------   
    
    private var _maximum:Number = 10;
    private var maxChanged:Boolean = false;
    
    /**
     *  Number which represents the maximum value possible for 
     *  <code>value</code>. If the values for either 
     *  <code>minimum</code> or <code>value</code> are greater
     *  than <code>maximum</code>, they will be changed to 
     *  reflect the new <code>maximum</code>
     *
     *  @default 10
     */
    override public function get maximum():Number
    {
        return _maximum;
    }
    
    override public function set maximum(value:Number):void
    {
        if (value == _maximum)
            return;

        _maximum = value;
        maxChanged = true;

        invalidateProperties();
    }
    
    //---------------------------------
    // stepSize
    //---------------------------------   
    
    private var stepSizeChanged:Boolean = false;
    
    /**
     *  @private
     */
    override public function set stepSize(value:Number):void
    {
        stepSizeChanged = true;
        super.stepSize = value;       
    }   
    
    //--------------------------------------------------------------------------
    //
    //  Overridden methods
    //
    //--------------------------------------------------------------------------
