Monday, May 31, 2010

DockPanel - how to maximize center?

Hi,

I use the following code to create my "screen". I want a MenuBar at
the top and that the content in the middle is always centered:

pnl = new DockPanel ();
pnl_Center = new VerticalPanel ();

pnl_Center.setHorizontalAlignment (VerticalPanel.ALIGN_CENTER);
pnl_Center.setVerticalAlignment(VerticalPanel.ALIGN_MIDDLE);
pnl_Center.setSize("100%", "100%");

pnl.setSize("100%","100%");
pnl.add (mnb,DockPanel.NORTH);
pnl.add (pnl_Center,DockPanel.CENTER);

RootLayoutPanel root = RootLayoutPanel.get();
root.add (pnl);

However, I noticed the following: The north part of pnl is a little
bit heigher than the MenuBar. And: When I add small content to
pnl_Center, its heigher than when I add big content to the center.

How can I achieve that the north part is just as high as the MenuBar?

Thank you
Magnus

--
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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment