         
         layoutTarget.measuredWidth = columnWidth;
         layoutTarget.measuredHeight = visibleHeight;
-        
-        layoutTarget.contentWidth = columnWidth; 
-        layoutTarget.contentHeight = contentHeight;
 
         layoutTarget.measuredMinWidth = minColumnWidth;
         layoutTarget.measuredMinHeight = rowHeight;
+        
+        layoutTarget.setContentSize(columnWidth, contentHeight);
     }
     
     

        
        // Finally, position the objects        
        var y:Number = 0;
        for each (var lo:ILayoutItem in layoutItemArray)
        {
            var x:Number = (unscaledWidth - lo.actualSize.x) * hAlign;
            lo.setActualPosition(x, y);
            if (!variableRowHeight)
                lo.setActualSize(lo.actualSize.x, rowHeight);
            var dy:Number = lo.actualSize.y;
            if ((explicitRowCount == -1) && (y < maxVisibleY) && ((y + dy) > minVisibleY)) 
            	visibleRows += 1;
            y += dy + gap;
        }
        if (explicitRowCount == -1) 
        	setRowCount(visibleRows);

        BasicLayout.setScrollRect(layoutTarget, unscaledWidth, unscaledHeight);
    }
    
    

        layoutTarget.measuredWidth = preferredWidth;
        layoutTarget.measuredHeight = (explicitRowCount == -1) ? preferredHeight : visibleHeight;

        layoutTarget.measuredMinWidth = minWidth; 
        layoutTarget.measuredMinHeight = minHeight;

        layoutTarget.setContentSize(preferredWidth, preferredHeight);
    }
   
   
