you can use 2 nested Horizontal panel and one Horizontal panel as container
es: ------------------------------------------ | -------------------- ----------------- | | | | | | | | -------------------- ------------------ | ------------------------------------------ setting HorizontalAlignment to left on the first nested Hp and to right on the second. then you can add the first 2 of your 3 widget to nested 1 and the thirth to nested 2. On 16 Feb, 09:31, smokey <[email protected]> wrote: > What would be the recommended way to align widgets left and right > within a fixed size of horizontal box? > > My specific case is I would like to align three widget putting "glue" > space between the second and the third (like "\hbox to \hsize{foo\quad > bar\hfil baz}" in TeX). > > I was using the following code as a hack and thought it was working > until I realized the buttonB is squished into very narrow button under > firefox-3.06 (was working on firefox-2 and Safari). > > final TextBox textBox = new TextBox(); > final Button buttonA = new Button(...); > final Button buttonB = new Button(...); > > final HorizontalPanel headerPanel = new HorizontalPanel(); > headerPanel.setWidth("100%"); > headerPanel.setSpacing(5); > headerPanel.add(textBox); > headerPanel.add(buttonA); > headerPanel.setCellWidth(buttonA, "100%"); > headerPanel.add(buttonB); > > What would be a more robust and cleaner way to achieve this? > > Thank you. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
