Hi

The workaround is to explicitly set the width using
DockPanel.setCellWidth(),

class Desktop extends DockPanel {
    Desktop() {
        setWidth("100%");
        Label label = new Label("West");
        add(label, DockPanel.WEST);
        // set a width that is small enough ...
        setCellWidth(label, "10%");
        add(new Label("Center"), DockPanel.CENTER);
    }
}


I'm not sure if hat is a elegant way though ... :-)


On Sat, Dec 27, 2008 at 1:23 AM, hezjing <[email protected]> wrote:

> Hi
> I have the following DockPanel,
>
> class Desktop extends DockPanel {
>     Desktop() {
>         setWidth("100%");
>         add(new Label("West"), DockPanel.WEST);
>         add(new Label("Center"), DockPanel.CENTER);
>     }
> }
>
> I want this panel to occupy the entire window, so I setWidth("100%").
> By doing this, the labels are displayed like the following (there is space
> in the west edge):
>
> |Title   |
> |West |Center ||
>
>
> It seems that there is a width specified for the west edge.
> How can control the width of the DockPanel's west edge so that the label
> can be displayed side-by-side?
>
> |Title   |
> |West|Center ||
>
>
>
>
> --
>
> Hez
>



-- 

Hez

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to