How to Display white spaces on Label Text ??

429 views
Skip to first unread message

Bloody_Joe

unread,
Apr 9, 2008, 2:59:50 AM4/9/08
to Google Web Toolkit
Hello everyone,
I have a label and I want to display on it the following string: "
String, "
Apparently, the white spaces at the beginning and at the end are being
wrapped, so ,
does anyone have an idea how to fix this ???
Thank's !

Peter Blazejewicz

unread,
Apr 9, 2008, 3:12:02 PM4/9/08
to Google Web Toolkit
hi,

white space (such one not required to be send over network) is by
default truncated (collapsed) by browsers (I think dated from old-
times when phone lines were frequently used)
http://webdesign.about.com/od/styleproperties/p/blspwhitespace.htm

regards,
peter

Fred Sauer

unread,
Apr 9, 2008, 11:13:49 PM4/9/08
to Google-We...@googlegroups.com
You might see if whitespace related issues 1520, 960 or 314 need your vote:

  http://code.google.com/p/google-web-toolkit/issues/detail?id=1520
  white-sapce:pre broken due to IE innerHTML whitespace clobbering

  http://code.google.com/p/google-web-toolkit/issues/detail?id=960
  DOM.setInnerText inconsistent white-space translation FF/IE

  http://code.google.com/p/google-web-toolkit/issues/detail?id=314
  Label getText() in a SimplePanel does not equal value from setText() when new lines are involved


Also, see these threads:
  http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/4a53a2d2489e0293/
  http://groups.google.com/group/Google-Web-Toolkit-Contributors/browse_thread/thread/7da4ca8f5be8bdf9
--
Fred Sauer
fr...@allen-sauer.com

darkflame

unread,
Apr 10, 2008, 11:22:34 AM4/10/08
to Google Web Toolkit
Dosnt "&nbsp" work?

so;

"&nbspString,&nbsp "


On Apr 10, 4:13 am, "Fred Sauer" <f...@allen-sauer.com> wrote:
> You might see if whitespace related issues 1520, 960 or 314 need your vote:
>
>  http://code.google.com/p/google-web-toolkit/issues/detail?id=1520<http://code.google.com/p/google-web-toolkit/issues/detail?id=960>
>   white-sapce:pre broken due to IE innerHTML whitespace clobbering
>
>  http://code.google.com/p/google-web-toolkit/issues/detail?id=960
>   DOM.setInnerText inconsistent white-space translation FF/IE
>
>  http://code.google.com/p/google-web-toolkit/issues/detail?id=314<http://code.google.com/p/google-web-toolkit/issues/detail?id=960>
>   Label getText() in a SimplePanel does not equal value from setText() when
> new lines are involved
>
> Also, see these threads:
>
> http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
>
> http://groups.google.com/group/Google-Web-Toolkit-Contributors/browse...
>
> On Wed, Apr 9, 2008 at 12:59 AM, Bloody_Joe <joechah...@hotmail.com> wrote:
>
> > Hello everyone,
> > I have a label and I want to display on it the following string: "
> > String,  "
> > Apparently, the white spaces at the beginning and at the end are being
> > wrapped, so ,
> > does anyone have an idea how to fix this ???
> > Thank's !
>
> --
> Fred Sauer
> f...@allen-sauer.com

sloughran

unread,
Apr 11, 2008, 10:49:06 AM4/11/08
to Google Web Toolkit
You could also use css on the label to add padding or margin spacing
to the label.
Reply all
Reply to author
Forward
0 new messages