Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Multiline textbox - add text instead of overwriting it

Posted on 2004-08-10
4
698 Views
Last Modified: 2010-07-27
Hi,

I have a multiline textbox, and I would like to add text to it when I click a button.  But when I use textbox1.text="something" it overwrites what was previously in the textbox.  I would like the text to be added to the existing text, but on a new line everytime I click the button.

Thanks guys.
0
Comment
Question by:jakekula
  • 2
4 Comments
 
LVL 18

Accepted Solution

by:
DotNetLover_Baan earned 500 total points
ID: 11768814
Hi there...
use
textbox1.text &="something"  (for VB.Net)
textbox1.text +="something";  (for C#.Net)
0
 
LVL 18

Expert Comment

by:DotNetLover_Baan
ID: 11768819
oops... missing "New line part"...  should be

textbox1.text &=VbCrLf & "something"  (for VB.Net)
0
 

Author Comment

by:jakekula
ID: 11768942
thanks DotNetLover but why aren't there any scrollbars when I exceed the vertical size of my textbox?
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 11769007
You have to set the Scrollbars property either in the IDE or in code like one of these:

    TextBox1.ScrollBars = ScrollBars.None
    TextBox1.ScrollBars = ScrollBars.Vertical
    TextBox1.ScrollBars = ScrollBars.Horizontal
    TextBox1.ScrollBars = ScrollBars.Both

Idle_Mind
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question