flexcomponents  

Re: [flexcomponents] How to determine the minimum container size while scroll bars still not needed

Manish Jethani
Wed, 27 May 2009 05:57:07 -0700

On Tue, May 26, 2009 at 7:52 PM, Sergey Kovalyov
<skovalyov.flexcod...@gmail.com> wrote:

> In my case I change width and height while the user is dragging the resize
> handle. That's why measure() is not being called and thus minWidth and
> minHeight equal 0. If I do some trick, it works:
>
> width = NaN;
>
> height = NaN;
>
> validateNow();
>
> But is there any more "cost efficient" method to enforce minWidth and
> minHeight recalculation?

That is the best way.

You could also create a public function on the Panel (subclass) that
calls measure() explicitly.

  public function forceMeasure():void
  {
      measure();
  }

Manish