On Tue, May 26, 2009 at 12:02 AM, Sergey Kovalyov
<[email protected]> 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