Window sizing (2)

Hi all,
I have a basic question again as I have solved all my interesting ones:
why when I create a window with the flag -resizeToFitChildren true and then a paneLayout and then an image does the window not fit the image exactly as I hoped but instead become as small as it can meaning I can't see the image?
How do I get the paneLayout to size itself to fit the image as I think this might be the problem.
Thanks
Tricky

I don't think I ever used an image with a paneLayout, but the times I have used an image it allways seems like I have to resize the image to the size of the image (bmp) that Im using.
I've also almost always have problems when using the -resizeToFitChildren flag...
Sorry I couldn't be more use full
--g

Its been my experience that the -resizeToFitChildren flag only _enlarges_ a window to the size of its largest child layout/control.

So the trick is if you have children that keep changing sizes (collapsable frameLayouts, tabLayouts etc) then you need a callback to make the window as small as possible and then edit the child layout/control to the size you want. The window will then automatically _enlarge_ to fit its children.

Might not be exactly what your looking for, but I realized that this flag doesn't work if you keep
"Windows -- Remember Size and Position" checked in
the preferences under Interface. Uncheck it and the flag gets interpreted correctly.

Might be worth a try.

Cheers, xzaran