ps-aux
ps-aux

Reputation: 12156

More space charactesr in sequence in GWT

I would like to add 3-5 spaces between two words in Label but what is effectively seen is only one.

getToolBar().setLabelText( "WordA        WordB");

result is:

WordA WordB

Is there a simple way hot to achieve this without using 2 Labels? I tried insert &nbsp but it did not work out.

Upvotes: 0

Views: 39

Answers (1)

David Levesque
David Levesque

Reputation: 22451

Instead of a Label you can use a HTML widget (extends Label). You can then use the setHTML() method to set the inner html, which can include   or any other valid html.

Upvotes: 2

Related Questions