On Mon, May 25, 2009 at 2:23 AM, Sergey Kovalyov
<[email protected]> wrote:

> Finally what I want to achieve is to have resize handle in the right bottom
> corner that allows to resize the container, but does not allow to make it
> smaller than the size when all children fit and no scroll bars are needed.

That should be the minWidth and minHeight properties of the container.

See this example:

  <mx:HBox backgroundColor="red" id="hb">

    <mx:Button width="100%" minWidth="30" />
    <mx:Button width="100%" minWidth="30" />
  </mx:HBox>

  <mx:Button click="hb.width-=5; trace(hb.minWidth, hb.width); " />

Click on the last button. It'll narrow the HBox by 5px. When the width
finally goes below the minWidth (68), the container will sprout
scrollbars.

minWidth of a container is the sum of all the minWidth of its
children, plus any padding and borders. Ditto minHeight.

Manish

-- 
www.manishjethani.com

Reply via email to