View Full Version : Window size to child

20 Oct 2011, 12:32 PM
How can you get a Window to size to its child component(s) instead of having to specify a size manually. This seems like the desired behavior in 99% of use cases for Windows and I can't find a straightforward solution. I have come up with a plethora of hacky ones but there should be a cleaner one.

20 Oct 2011, 1:31 PM
I agree, it's one of the few clear use cases where the top-down sizing model isn't sufficient.

I've been working on a plugin for this very use case. It isn't quite finished yet, I have some problems with edge cases, but in the circumstances you've described it should work fine. I'll send you a copy over PM.

20 Oct 2011, 2:21 PM
Thanks a lot for putting that together. Unfortunately I filed this in the wrong forum and meant to ask it for GXT. If you want to put that code up I'll mark it as the best answer and consider this resolved.