Hi, this works.
public class A implements EntryPoint { /** * This is the entry point method. */ public void onModuleLoad() { DockLayoutPanel p = new DockLayoutPanel(Unit.EM); p.addNorth(new HTML("north"), 5); p.addSouth(new HTML("south"), 4); HTML east = new HTML("<div style='float: right;'>east</div>"); p.addEast(east, 20); p.addWest(new HTML("west"), 6); Style style = p.getElement().getStyle(); style.setPosition(Position.ABSOLUTE); style.setLeft(0, Unit.PX); style.setRight(0, Unit.PX); style.setTop(0, Unit.PX); style.setBottom (0, Unit.PX); RootPanel.get().add(p); } } Stefan Bachert http://gwtworld.de On Jul 2, 6:06 pm, Stefan Bachert <stefanbach...@yahoo.de> wrote: > Hi, > > try > > DockLayoutPanel p = new DockLayoutPanel(Unit.EM); > p.addNorth(new HTML("north"), 5); > p.addSouth(new HTML("south"), 2); > HTML east = new HTML("east"); > east.getElement().getStyle().setProperty("marginRight", "auto"); > p.addEast(east, 20); > p.addWest(new HTML("west"), 2); > > Not tested yet > > Stefan Bacherthttp://gwtworld.de > > On Jul 2, 10:28 am, nasionalem <sakarya.me...@gmail.com> wrote: > > > Hello, > > > I'm new in GWT development and need some help. > > I use GWT 2.0 and in my project I have a DockLayoutPanel which > > inculudes north, south, east and west. I have added a widget in East > > edge. But Its on right side of the East edge. How can I align the > > widget to the right side in East edge? > > > // Sample Code > > > DockLayoutPanel p = new DockLayoutPanel(Unit.EM); > > p.addNorth(new HTML("north"), 5); > > p.addSouth(new HTML("south"), 2); > > p.addEast(new HTML("east"), 20); > > p.addWest(new HTML("west"), 2); > > > p.addEast(sampleWidget,20); > > > //I have tried this > > // > > mainPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT); > > //But it just align the things (texts, buttons...) to right side in > > the widget. > > // The widget still right side > > > Thanks -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.