On Tuesday, July 16, 2013 6:39:58 PM UTC+2, Jens wrote: > > HorizontalPanel and VerticalPanel distribute their cells equally if you > don't specify anything. E.g. a VerticalPanel with two children will result > in two 50% height cells. That's how HTML tables work in general if you do > not specify sizes. > > To define the width/height of a cell use <g:cell height=...><g:Label > /></g:cell>. > > The JavaDoc of CellPanel describes it. >
…and most of the time, you don't actually need VerticalPanel or HorizontalPanel, and FlowPanel is enough. In this specific case, because <g:Label> renders as <div> and thus is intrinsically a block element, the ListBox will flow below it when both are put in a FlowPanel. And because <g:Button> renders as a <button>, it's intrinsic rendering is 'inline' (inline-block) so the buttons would flow on the same line when put in a FlowPanel. I would however not use a <g:Label> (try to avoid widgets when you don't need them, e.g. for simple widgets, when you don't need to handle events) here and would rather go with an HTMLPanel and <label> element (or <div> if you like, or maybe even no wrapping element) possibly followed by a <br/> or styled as "display: block". -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
