FlowPanel renders as a div, which has a default width of 100%. The only block-level element I'm aware of that shrinks horizontally to fit its content is a table. You can try using display: table; on the div, but you'll have trouble with IE support. You may just have to use an actual table to get the effect you want.
BTW, HorizontalPanel and VerticalPanel (as well as Grid and FlexTable) are implemented using tables. It can be heavy-weight to use a Widget for this, especially if you only need one cell, however it works in a pinch. I tend to use UiBinder with a root HTMLPanel. That way I can do whatever I need for layout and mix widgets in as needed. -Brian On Sat, Dec 11, 2010 at 9:22 PM, Magnus <[email protected]> wrote: > Hi, > > my FlowPanel contains just a few buttons, but it receives 90% of the > available width. > > How can I make it so small, that it just contains the buttons, but > nothing more? > > Magnus > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
