Hi nasionalem,

I haven't tried your code but it seems your problem is:

p.addEast(sampleWidget,20);

With this instruction, you are not adding a widget to the East, but
adding a new East

One way to do it is to add the East just after you have sampleWidget
ready.

This is possible because you can add more than one East do the
DockLayoutPanel widget.

Hope this helps.


On 2 Jul, 09:28, 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.

Reply via email to