Home All Groups Group Topic Archive Search About

TableCell Text Wrapping Problem!

Author
19 May 2005 5:58 PM
Amelyan
If I have spaces in my Text property of Label, and I add it to TableCell, it
wraps at spaces.  E.g.

Label lb = new Label();
lb.Text = "Hello, World!"
TableCell cell = new TableCell();
cell.Controls.Add(lb);


The resulting TableCell html render will look like this
_______
| Hello,    |
| World!  |
|_______|

However if I don't have spaces in my lb.Text, "Hello,World!", the resulting
TableCell html render will look like
___________
| Hello,World! |
|___________|

with "World!" written on new line.  How can I disable this line wrapping for
Text which contains spaces?

Thank you,
-Amelyan

Author
19 May 2005 8:03 PM
Mythran
Show quote Hide quote
"Amelyan" <bamel***@wi.rr.com> wrote in message
news:%234HLWxJXFHA.3464@TK2MSFTNGP10.phx.gbl...
> If I have spaces in my Text property of Label, and I add it to TableCell,
> it wraps at spaces.  E.g.
>
> Label lb = new Label();
> lb.Text = "Hello, World!"
> TableCell cell = new TableCell();
> cell.Controls.Add(lb);
>
>
> The resulting TableCell html render will look like this
> _______
> | Hello,    |
> | World!  |
> |_______|
>
> However if I don't have spaces in my lb.Text, "Hello,World!", the
> resulting TableCell html render will look like
> ___________
> | Hello,World! |
> |___________|
>
> with "World!" written on new line.  How can I disable this line wrapping
> for Text which contains spaces?
>
> Thank you,
> -Amelyan
>

on the cell, add the nowrap attribute :)

Mythran
Author
21 May 2005 4:02 PM
Amelyan
Works!  Thanks a lot,

Amelyan

Show quoteHide quote
"Mythran" <kip_potter@hotmail.comREMOVETRAIL> wrote in message
news:eyaNL3KXFHA.1508@tk2msftngp13.phx.gbl...
>
> "Amelyan" <bamel***@wi.rr.com> wrote in message
> news:%234HLWxJXFHA.3464@TK2MSFTNGP10.phx.gbl...
>> If I have spaces in my Text property of Label, and I add it to TableCell,
>> it wraps at spaces.  E.g.
>>
>> Label lb = new Label();
>> lb.Text = "Hello, World!"
>> TableCell cell = new TableCell();
>> cell.Controls.Add(lb);
>>
>>
>> The resulting TableCell html render will look like this
>> _______
>> | Hello,    |
>> | World!  |
>> |_______|
>>
>> However if I don't have spaces in my lb.Text, "Hello,World!", the
>> resulting TableCell html render will look like
>> ___________
>> | Hello,World! |
>> |___________|
>>
>> with "World!" written on new line.  How can I disable this line wrapping
>> for Text which contains spaces?
>>
>> Thank you,
>> -Amelyan
>>
>
> on the cell, add the nowrap attribute :)
>
> Mythran
>