Hi again, Manish!

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?

Sergey.

On Mon, May 25, 2009 at 9:43 PM, Manish Jethani <[email protected]>wrote:

>
>
> On Tue, May 26, 2009 at 12:02 AM, Sergey Kovalyov
> <[email protected] <skovalyov.flexcoders%40gmail.com>> wrote:
>
> > It is Panel (in fact my custom class derived from Panel) and it contains
> different content. I have tested on some panel instances.
>
> If you substitute the HBox in my previous example for a Panel
> (layout="horizontal"), you'll see it still works. So I would have to
> blame the contents for not reporting their minWidth/minHeight values
> correctly. Are these custom components inside the Panel?
>
> minWidth is the sum of all minWidth of the child objects, plus any
> padding and borders. In my example, we're using Button objects. They
> report their minWidth correctly, so it works.
>
> If you custom components do not calculate their minWidth/minHeight in
> their measure() implementations for some reason (maybe they're
> third-party components), you can set explicit values on them.
>
> <Panel>
> <CustomComponent minWidth="100" minHeight="120" />
> </Panel>
>
> Try that.
>
> Manish
>
> 
>

Reply via email to