PDA

View Full Version : Setting height in a HorizontalPanel



mickyg
10 Jan 2011, 9:34 AM
My LayoutContainer has a HorizontalPanel that I use to display error messages in a popup. I'd like to set a max height for this panel (4 lines of error message), and enable a scrollbar if the message size exceeds this limit. How do I implement this?

Also, I'd like the HorizontalPanel to be only one line high if the message is just one line (autosize, i guess?)

Any help would be appreciated.

Thanks!
Micky

Ersmarker
25 Jan 2011, 3:18 AM
Hi.

The sizing of the components is done by the layout system.
You need to create a custom layout to support max height.

A good start is to extend the layout you are using for the container of the HorizontalPanel and override the onLayout method.