How to add a widget inside a Text Area GWT

175 views
Skip to first unread message

gangurg gangurg

unread,
Jul 17, 2011, 5:15:48 PM7/17/11
to Google-We...@googlegroups.com
How do i add a widget inside a  GWT Text Area . I want to a Grid ,or VerticalPanel or HorizontalPanel 

yes2000

unread,
Jul 17, 2011, 9:03:22 PM7/17/11
to google-we...@googlegroups.com, Google-We...@googlegroups.com
In GWT, If one widget can contain another widget, It must be implement HasWidgets interface.

So if you wnat int add a widget to your "GWT Text Area", you first should check your "GWT Text Area" whether implement HasWidgets or not.

GWT Kid於 2011年7月18日星期一UTC+8上午5時15分48秒寫道:

gangurg gangurg

unread,
Jul 18, 2011, 2:03:31 AM7/18/11
to google-we...@googlegroups.com
Thanks , I did that but the widget does not show up . Do you have any example 

2011/7/17 yes2000 <kent.y...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/fuykaVywf1MJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Jens

unread,
Jul 18, 2011, 4:10:37 AM7/18/11
to google-we...@googlegroups.com
GWT's TextArea maps directly to a HTML TextArea thats why you can only set text to it. The only thing you can do ist create a Grid/VerticalPanel/HorizontalPanel and put in each cell a separate TextArea.

-- J.

mP

unread,
Jul 18, 2011, 10:41:32 PM7/18/11
to Google Web Toolkit
While you cant "add" a widget to a text area if you want to make it so
a widget appears inside a TextArea, you can achieve this by
positioning another separate widget over the same area that the text
area occupies. Dont forget to set the z index so the overlapping
widget appears in front of the background TextArea.
Reply all
Reply to author
Forward
0 new messages