On 3 November 2011 17:20, Alan Chaney <alan@mechnicality.com> wrote:
Ice13illA FlowPanel is a container for widgets - not a container for widgets and some text at end!.
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)
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+unsubscribe@googlegroups.com.
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 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