Correct way to size a panel
I have a panel with an hbox layout and two child items. Basically I want to the panel to size itself (height-wise) based on the child items. The child items do not have a fixed height.
If do not set a height on my panel, it collapses to a single pixel in height. Is there something I'm doing wrong here? Currently I'm working on writing a listener which checks the height of the child items and resizes the parent based on the tallest child. This seems like a lot of work for something that should be simple.
Any help is appreciated.
It should Just Work on 4.1
As long as the child items yield a height upon layout, then the Panel should acquire their height.
Of course we need to see code.
Tags for this Thread