Just to be clear, HorizontalPanel is still supported and can still be used in strict mode to layout children horizontally, ensuring that they never wrap to the next row. It sounds like this is what you need.
The difference between quirks and strict is a behavioral one. In quirks mode, setting the button's height and width to 100% would fill the cell in the HorizontalPanel. In strict mode, this is not the case. The doc you referenced is just making this point, which is why it says "And of course, you can continue to use HorizontalPanel<http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/user/client/ui/HorizontalPanel.html> itself, as long as you take the caveats above into account." Thanks, John LaBanca [email protected] On Tue, Dec 14, 2010 at 10:35 AM, l.denardo <[email protected]>wrote: > You're right, I read the op without the right attention. > > What I suggested works well if you just need to lay out your widgets > in a row, as many button bars do. > In that case the solution I suggest will work, and the bar will be > truncated or wrap around if there's not enough space for all widgets, > depending on layout, but "natural" wodget size won't be affected. > > A layout panel, the way you suggested, will certainly be better. > > Regards > Lorenzo > > On Dec 14, 4:09 pm, Brian Reilly <[email protected]> wrote: > > It's a bit more complicated than that, and you really have to look at > > the provided example in IE7 (not IE8, which works fine) to understand > > what's happening. > > > > From what I understand, you want to have 2 widgets, a text field and a > > button, displayed in a row. Your layout is fluid, so the width of the > > row adjusts with the width of the window. You want the button on the > > right to take up it's natural size based on the button text and the > > text field on the left to take up the remaining space available. > > > > Unfortunately, I'm not sure how to accomplish that. You may be able to > > get something to work by explicitly setting the width of the button's > > panel (em units would probably be best). I could imagine a > > DockLayoutPanel with an east panel containing the button and the > > center panel containing the text field. Set the width of both elements > > to 100% and the panel should constrain the sizes. > > > > Other than that, you may have to resort to doing some layout in > > code... measuring sizes and setting widths explicitly. > > > > -Brian > > > > On Tue, Dec 14, 2010 at 4:09 AM, l.denardo <[email protected]> > wrote: > > > Hello, you could simply use a FlowPanel and set a float:left property. > > > I did it, overriding the add(Widget w) method to recursively set the > > > float on children of added widgets, and it proved to work well. > > > > > Regards > > > Lorenzo > > > > > On Dec 14, 7:09 am, Hilco Wijbenga <[email protected]> wrote: > > >> On 13 December 2010 21:41, Jim Douglas <[email protected]> wrote: > > > > >> >> for strict mode I need a replacement for HorizontalPanel. > > > > >> > Why? What's wrong with HorizontalPanel? > > > > >>http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html#St. > .. > > > > >> HorizontalPanel is for quirks mode. > > > > > -- > > > 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]<google-web-toolkit%[email protected]> > . > > > For more options, visit this group athttp:// > 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]<google-web-toolkit%[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.
