473,698 Members | 2,528 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MultiLine TextBox, how to set height?

I have a MultiLine TextBox to which I add text like this:

TextBox1.Attrib utes.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
Nov 19 '05 #1
1 3386
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" <x@y.com> wrote in message
news:uu******** ******@TK2MSFTN GP14.phx.gbl...
I have a MultiLine TextBox to which I add text like this:

TextBox1.Attrib utes.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

Nov 19 '05 #2

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

Similar topics

2
1513
by: gjtired | last post by:
Hi, I'm not sure the best way to do something and I hope someone can help me. I'm developing a web application that a user enters test questions in. I store the questions in a database. When a person takes the test I need to be able to display the questions. I can use a multiline text box but I want the user to see the entire question and not have to use the scroll bars. I also don't want the scroll bars visible if they are not used. I...
3
2267
by: Simon Middlemiss | last post by:
I have a multiline textbox which I would like populated in the following manner. "Line1 Line2 Line3 Line4" etc. I know how to do it in code, but is there a way to do it in the design view?
7
4031
by: Joel Finkel | last post by:
Folks, I have a form that has several TextBoxes, some of which have the TextMode set to MultiLine. Each is pre-loaded with data from a database. The user is allowed to modify each entry. The problem is that only the modified data from the SingleLine TextBoxes are returned. The original data are returned for the MultiLine TextBoxes. Also, if the page is sent to the server (for validation, for instance), only the modified data for the...
2
2485
by: Enzo Marinelli | last post by:
Hello everyone I have a MultiLine TextBox, as follows <asp:TextBo Id="StreetAddress Rows="4 Runat="Server TextMode="MultiLine Width="100%"/
1
3843
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 has multiline textbox inserted. I need to force insert more and more row lines, the scrollbar of gridbox displayed. Is there any another good multiline textbox control column style? Thanks
1
3807
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 vertical scrollbar of a textbox all the way down (indicating that the user at least pretended to read all of the textbox's text). How can I monitor the scrollbar and know when it has reached the end? 2. My multiline textbox has VerticalScrollBar...
7
15468
by: Anil Gupte | last post by:
I have read a lot about getting lines from a multiline textbox in VB.Net. However, I cannot for the life of me figure out how to write to a multiline textbox. Basically, I have created an array of strings which I want to "paste" into a multiline textbox. Any ideas? -- Anil Gupte www.keeninc.net www.icinema.com
2
5818
by: Nathan Sokalski | last post by:
I have a multiline TextBox that I want to display the text used to create a control in an apsx file. I want each of these to be on a separate line in the TextBox. The only way I know of to place things on separate lines in a TextBox without doing it programmatically is the following: <asp:TextBox ID="txtMultiLine" runat="server" TextMode="MultiLine"> Line 1 Line 2 Line 3 </asp:TextBox>
1
7567
by: fniles | last post by:
I am using VB.NET 2008. I have a multiline textbox on the form that I would like to print when the user click on the "Print" button. With my codes below, when the text are in more than 1 page (say 3 pages) of the textbox, when it prints the text in the text box, the 2nd and 3rd pages are printed on the same page with the 1st page. So, instead of printing 3 pages, it prints 1 page with the text from page 2 and 3 are printed on top of each...
0
8609
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8899
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7738
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.