Odds are that your VerticalPanel is not occupying the full height of
the west component.  In the future I recommend using Firebug in
Firefox to, for example, examine the VerticalPanel.  Try setting the
height of the VerticalPanel to "100%" -- so that it vertically fills
the west component.  At that point the items within the VerticalPanel
should vertically center as you expect.



On Jul 15, 8:50 am, zorro2b <[email protected]> wrote:
> I am trying to align a button in the center of the west panel of a
> dock. I am trying to do so by inserting a VerticalPanel in the west
> panel and setting its vertical alignment to align middle. This has no
> affect. The button is aligned to the top of the panel.
>
> What is the correct way to do this?
>
> This is what I am doing:
>
>         DockPanel dp = new DockPanel();
>
>         Button back = new Button("<<");
>
>         VerticalPanel west = new VerticalPanel();
>         west.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
>         west.add(back);
>
>         dp.add(west, DockPanel.WEST);
>         dp.add(vPanel, DockPanel.CENTER);
>         ...
--~--~---------~--~----~------------~-------~--~----~
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