Ice13ill

On 11/3/2011 6:30 AM, Ice13ill wrote:
Hello, I want create a panel with a flow layout (for ex. FlowPanel)
which contains 2 widgets and a large text at the end (not a<div>  or
another element)
I tried to add the widgets and then set the panel's element text:

flowPanel.add(w1)
flowPanel.add(w2)
flowPanel.getElement.setInnerText(largeText)
A FlowPanel is a container for widgets - not a container for widgets and some text at end!.

Its a bit of a simplification, but basically gwt widgets render by doing exactly what you've done in the 3rd line. The best you could do is to retrieve the inner text and append your text to it - but really, that's a hack.

My preference would be to put the text in an appropriate widget, such as an HTML Widget and add that instead of manipulating the text directly, or if you want the text to be unstyled, then use a Label widget.

HTH

Alan



but the last line overrides all other widgets.

How can i do this (but without using UIBinder for now.) ?


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

Reply via email to