I have a ListBox with a heading that looks like this:

___________Name___________|__________Location__________


I add to the ListBox (maybe) several strings that I have built up from
two pieces of data: a name and a city/town name.  I need the resulting
string to display such that the city/town name begins just one space
into the location part of the display.  I have a method to padString
which I use to pad out the length of the name plus as many spaces as
required to put the location at the right place once appended to the
name+spaces part of the string.

This approach does not work because the browser ignors multiple spaces
and treats them as one, so I lose my padding.   This application is a
conversion from the same app written using HTML and javaScript.  In
that version I was successful in establishing the pad because I
appended a number of   (non-breaking space) rather than plain
spaces.

Presently, I am padding with underscores to be able to see how this is
working, and that it is working.  I can see the padding is working
okay but the font is a variable width font and the result is a
staggered text display, depending on the number of and specific
characters in the name part.

Now, There may be a way for me to add non-breaking spaces rather than
plain spaces as padding.  How might I do that?  Even so, I will
probably have to set the font in the ListBox to a momospaced font so I
get exact apacing of every character.  I know there is a problem
setting a font using css in a GWT app.

Here is the relevant part of my current css for this problem:
.gwt-ListBox-selectList {
  white-space: pre;
  background: lightgray;
 }

The 'pre' doesn't work, either.  As best I can tell this is a browser
problem. I am using Firefox version 1.5.0.12.

Suggestions, please?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to