Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > MultiLine TextBox, how to set height?

Reply
Thread Tools

MultiLine TextBox, how to set height?

 
 
Olav Tollefsen
Guest
Posts: n/a
 
      01-30-2005
I have a MultiLine TextBox to which I add text like this:

TextBox1.Attributes.Add("style","overflow :hidden");
TextBox1.Text = "Line 1\r\nLine 2\r\nLine 3";

The number of lines added to the TextBox can be variable.

Right now (without setting any width / height), I can only see two lines of
text. If I click with the mouse in the TextBox, I can see the rest of the
text by moving the the mouse inside the TextBox.

How can I set the height / width of the TextBox to be exactly right to
display all the content?

Olav


 
Reply With Quote
 
 
 
 
Olav Tollefsen
Guest
Posts: n/a
 
      01-30-2005
I found that it was better to use a Label and this code instead:

Label1.Text = "Line 1<br />Line 2<br />Line 3";

Olav

"Olav Tollefsen" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a MultiLine TextBox to which I add text like this:
>
> TextBox1.Attributes.Add("style","overflow :hidden");
> TextBox1.Text = "Line 1\r\nLine 2\r\nLine 3";
>
> The number of lines added to the TextBox can be variable.
>
> Right now (without setting any width / height), I can only see two lines
> of text. If I click with the mouse in the TextBox, I can see the rest of
> the text by moving the the mouse inside the TextBox.
>
> How can I set the height / width of the TextBox to be exactly right to
> display all the content?
>
> Olav
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Label has not multiline property to set? enhung ASP .Net Web Controls 2 01-18-2006 06:38 PM
how to define a variable to hold a multiline text input in perl from html multiline textbox dale zhang Perl Misc 8 11-30-2004 06:53 AM
adobe multiline substitution Justin Perl 0 12-08-2003 08:28 PM
Different fonts in multiline text box... Michael Tanner ASP .Net 1 07-25-2003 05:55 PM
how to limit user input into the multiline text box???? cw ASP .Net 1 06-27-2003 11:57 AM



Advertisments