473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

MultiLine TextBox, how to remove vertical scrollbar?

I have added a MultiLine TextBox to my aspx page:

<asp:TextBox ID="TextBox1" runat="server" BorderStyle="None" ReadOnly="True"
TextMode="MultiLine"></asp:TextBox>

Then I add two lines of text to it:

TextBox1.Text = "Line 1\r\nLine 2";

The problem is that a vertical scrollbar is displayed

How do I get rid of the vertical scrollbar?

Olav
Nov 19 '05 #1
1 15650
Hi Olav,

You can use the overflow attribute to turn off the scrollbars:

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

Ken
Microsoft MVP [ASP.NET]
Toronto
"Olav Tollefsen" <x@y.com> wrote in message
news:OX**************@TK2MSFTNGP11.phx.gbl...
I have added a MultiLine TextBox to my aspx page:

<asp:TextBox ID="TextBox1" runat="server" BorderStyle="None"
ReadOnly="True" TextMode="MultiLine"></asp:TextBox>

Then I add two lines of text to it:

TextBox1.Text = "Line 1\r\nLine 2";

The problem is that a vertical scrollbar is displayed

How do I get rid of the vertical scrollbar?

Olav


Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Nathan Wallace | last post by:
When in quirks mode, IE seems to be able to display pages without any vertical scrollbar: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <style> body {...
2
by: pothik05 | last post by:
I have a multiline textbox (with scrollbar) on a form. I add lines to the textbox at runtime. If the number of lines crosses the visible area in the textbox, I want the scrollbar to scrolldown. I...
3
by: buht | last post by:
Hello Everyone, Fairly new to c# here and have a question regarding scrollbars, particularly a vertical scrollbar. It looks like my options are restricted for the textbox scrollbars being...
1
by: ABC | last post by:
I tried KDNGrid's (www.knowdotnet.com) Multiline textbox column style for datagrid. It is very good but has some bug on wrong handle datagrid height that cannot display the scrollbar when a row...
1
by: Flack | last post by:
Hey guys, I have two questions regarding the vertical srollbar of a multiline textbox. 1. I have an "Ok" button that is initially disabled. I want it to be enabled when the user scrolls the...
0
by: charlie1 | last post by:
I have a text box that has a vertical scrollbar on the right hand side - whever the textbox is opened, the vertical scrollbar defaults to the bottom. How can I make the scrollbar default to the...
4
by: ShaneO | last post by:
In a Windows Form I have a RichTextBox with Multiline = True and ScrollBars = Vertical. As expected, when Text is loaded into the RTB the Vertical ScrollBar will appear if needed. Does anyone...
0
by: shihab | last post by:
Hai all, How to keep a multiline + vertical scrollbar textbox on the LAST line in Asp.net with c# ,when refreshing page? thanx, sihab
3
by: Avi | last post by:
Hi all, I have a web page with Multiline TextBox. Every 3 seconds I refresh the page and display all received messages in this TextBox. When the TextBox is updated (The Text property is set). ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.