      */
     protected function setElementSize(element:Object, width:Number, height:Number):void
     {
-        if (element is ILayoutElement)
+		if (element is StyleableTextField)
+		{
+			// take into account text gutters
+			element.width = width + StyleableTextField.TEXT_WIDTH_PADDING;
+			
+			// take into account textTopOffset and baselineBottomOffset
+			element.height = height + StyleableTextField(element).textTopOffset + StyleableTextField(element).baselineBottomOffset;
+		}
+		else if (element is ILayoutElement)
         {
             ILayoutElement(element).setLayoutBoundsSize(width, height, false);
         }

     */
    protected function getElementPreferredHeight(element:Object):Number
    {
        if (element is ILayoutElement)
        {
            return ILayoutElement(element).getPreferredBoundsHeight();
        }

        {
            return IFlexDisplayObject(element).measuredWidth;
        }
		else
        {
            return element.width;
        }
