Re: formating ListBox text

2009-08-17 Thread BobM

No, appending HTML   to a string doesn't work to solve my
problem.  However, I have found if I append a period and a space (sort
of as a single character) each space is retained because of the
protecting period, I can get close enough for my purposes.

If I could now set the font to a monospced font like Courier, I would
be "home free", I think; but that seems not to be possible at present.

I feel like I have "solved" my problem, for now.  (Kind of sloppy, but
it works.)  Thank you.

On Aug 17, 7:57 am, BobM  wrote:
> Can I use HTML to generate a non-breaking space to append to a String
> to put into the ListBox to force formatting of the string?  Maybe I
> will try that later today.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: formating ListBox text

2009-08-17 Thread BobM

Hm ... The data, name and location, are two fields of a database
row.  I retrieve several (related) at a time from the database and put
the two key fields into the ListBox and then select which one I want
to use thereby selecting the rest of the fields from the database
record to display in other TextBoxes on the page.  ListBox seems just
the right thing for that.  However, if I can select from a table and
use the index (row number) from the selection to pick off (out of an
array) the record containing the other fields to display that would
certainly work.

I will look into that.

Thanks.

On Aug 17, 3:44 am, mars1412  wrote:
> why don't you use a table or the 
> like?http://code.google.com/intl/de-DE/docreader/#p=google-web-toolkit-doc...
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: formating ListBox text

2009-08-17 Thread BobM

ListBox has methods allowing me to set and get the selected index.  I
cannot find any similar facilities in HTMLTable.  Am I overlooking
something?

Can I use HTML to generate a non-breaking space to append to a String
to put into the ListBox to force formatting of the string?  Maybe I
will try that later today.

For now ListBox still looks to be the cleanest tool for my needs - IF
I can get the text properly formatted.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: formating ListBox text

2009-08-17 Thread mars1412

why don't you use a table or the like?
http://code.google.com/intl/de-DE/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideWidgetGallery

On Aug 16, 11:52 pm, BobM  wrote:
> 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 Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



formating ListBox text

2009-08-16 Thread BobM

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 Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---