Saturday, January 29, 2011

Re: What makes a DockLayoutPanel stretch its child and what prevents an AbsolutePanel from doing so?

You could use a LayoutPanel: using (top,height)=(0,100%)+(left,width)=(0,100%) (which actually is the default if you don't say anything) the widget will fill the panel; using other combinations you could position and size widgets the way you want (you have to give the width and height when adding the widget though, contrary to AbsolutePanel).

...or you could have your base class be a Composite and let subclasses call the initWidget with the appropriate widget for their requirements: LayoutPanel or AbsolutePanel.
(in general, you should compose rather than extend)

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