The FlowPanel (just a simple <div> that leaves its children's styles
unmodified) already allows you to do this. For the vertical case, this tends
to happen naturally with block-level children.

The horizontal case is trickier, however. Using float:left captures some,
but definitely not all cases (vertical alignment is quite hard).
inline-block isn't supported on all browsers (and has behavior quirks even
on modern browsers). Basically, there's no simple answer that actually works
across browsers, so we haven't yet tried to offer a widget that does this
automatically. Your best bet is to actually just use a FlowPanel and style
its children using the kinds of tricks described in the linked Wikipedia
article. Maybe one day we'll get hbox/vbox/flexbox across browsers, but
until then horizontal alignment is extremely difficult to generalize.

Cheers,
joel.

Le 25 mai 2010 06:39, Ivo <ivom...@gmail.com> a écrit :

> The next GWT Developments, will have alternatives to the VerticalPanel
> and HorizontalPanel, using no table tags??
> http://en.wikipedia.org/wiki/Tableless_web_design
>
> For instance, the HorizontalPanel could have a alternative named
> HorizontalFlowPanel, that instead of generate this code:
>
> <table>
>  <tr>
>  <td>
>   cell1
>  </td>
>  <td>
>   cell2
>  </td>
>  </tr>
> </table>
>
> Generate that:
>
> <div style="float:left">
>  cell1
> </div>
> <div style="float:left">
>  cell2
> </div>
>
> This alternative is lighter for the browser, and for the developer
> when we needs to know what code are GWT generating. You have some
> development in this area?
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to