Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I format text in GWT label widget

Tags:

widget

gwt

I would like to break a long line of text assigned to the standard Label widget in GWT. I was experimenting with inline <br /> elements but with no success.

Something like this:

label = "My very very very long<br />long long text"
like image 685
Drejc Avatar asked Oct 17 '08 13:10

Drejc


2 Answers

You need to use the HTML widget, which extends the standard Label widget, and adds support for interpreting HTML tags.

See the JavaDoc.

like image 118
jgindin Avatar answered Oct 12 '22 16:10

jgindin


I would use CSS to style the label to fit a given with and drop the <br/> all together.

like image 24
smerten Avatar answered Oct 12 '22 15:10

smerten