It extends CellPanel, which says that its widgets are contained in the cells
of a table, but you'd have to know to look at the super class and you'd have
to be familiar with how tables handle their contents.  So, we should update
the JavaDoc to explain better how table based panels work in practice.

Thanks,
John LaBanca
[email protected]


On Thu, Jan 13, 2011 at 4:36 PM, Leung <[email protected]> wrote:

> Hi John,
>
> Thanks for you reply.
> Just for learning purpose, how can you tell from the document that the
> VerticalPanel will always auto fit the child content and the FlowPanel wont?
>
> In general, how can I tell which panel or widget does auto fit the child
> widget and which doesnt?
>
> Thanks
> Ming
>
> --- On *Thu, 1/13/11, John LaBanca <[email protected]>* wrote:
>
>
> From: John LaBanca <[email protected]>
> Subject: Re: setwidth and setCellWidth of the VerticalPanel
> To: [email protected]
> Date: Thursday, January 13, 2011, 11:48 PM
>
> VerticalPanel is implemented using a table, which means that it will always
> auto expand to fit its contents.  If you want to ensure that it is 400px,
> wrap each child content in a FlowPanel and set the width of the FlowPanel to
> 400px and overflow to hidden (or scroll).
>
> Thanks,
> John LaBanca
> [email protected]<http://us.mc342.mail.yahoo.com/mc/[email protected]>
>
>
> On Thu, Jan 13, 2011 at 6:31 AM, Leung 
> <[email protected]<http://us.mc342.mail.yahoo.com/mc/[email protected]>
> > wrote:
>
> Hi
>
> I need to make the width of the VerticalPanel constant. I have tried
> setwidth and setCellWidth, but both seem not working well.
>
> For example,
>
> VerticalPanel vp = new VerticalPanel();
> vp.setCellWidth(this, "400px");
> Label textlabel = new textlabel();
> textlabel.add(text); <--
> vp.add(textlabel);
>
> If the text is a string containing various spaces, then the width is able
> to be kept because the wrap is on. Otherwise, if the text is a string
> without space longer than 400px, the string would not wrap. How can I make
> the width constant independent of the string?
>
> 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 
> [email protected]<http://us.mc342.mail.yahoo.com/mc/[email protected]>
> .
> To unsubscribe from this group, send email to
> [email protected]<http://us.mc342.mail.yahoo.com/mc/compose?to=google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
> --
> 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]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
>  --
> 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]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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