| | |
move cursor automatically in a richtextbox
Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved |
Hello,
I have a richtextbox which I write lines of data to. However, everytime a new line is written to the richtextbox it overwrites the last line of data so therefore after the progam runs only the last line of data is displayed in the richtextbox. I need the lines to be displayed in a list but I don't know what code I can use to make sure the cursor moves to a new line before writting the data to the richtextbox.
I appreciate any help I can get with this problem.
Thanks in advance,
SubProf
I have a richtextbox which I write lines of data to. However, everytime a new line is written to the richtextbox it overwrites the last line of data so therefore after the progam runs only the last line of data is displayed in the richtextbox. I need the lines to be displayed in a list but I don't know what code I can use to make sure the cursor moves to a new line before writting the data to the richtextbox.
I appreciate any help I can get with this problem.
Thanks in advance,
SubProf
Hi,
I think u not appending the text in Richtextbox rather u are assign a text
For Ex
or
Example Code
I think u not appending the text in Richtextbox rather u are assign a text
For Ex
richText1.Text = someString; U can tryrichText1.Text += someString; or
richText1.AppendText ( someString ); Example Code
C# Syntax (Toggle Plain Text)
string[] str = { "C#", "Programming", "language"}; foreach (string s in str) { //richTextBox1.Text += s; //or richTextBox1.AppendText(s); }
Last edited by selvaganapathy; Jun 4th, 2008 at 12:57 pm.
KSG
![]() |
Other Threads in the C# Forum
- Previous Thread: Flash and c# connectivity problem
- Next Thread: Calculate "time ago" - time that passed since a DateTime
| Thread Tools | Search this Thread |
.net access ado.net algorithm array backup barchart bitmap box broadcast buttons c# chat check checkbox client color combobox control conversion csharp custom database datagrid datagridview dataset datetime decryption degrees development draganddrop drawing encryption enum event excel file files form format forms function gdi+ httpwebrequest i18n image imageprocessing index input install java label list listbox listener mandelbrot math mouseclick mysql operator path photoshop picturebox pixelinversion post programming radians regex remote remoting richtextbox saving serialization server sleep socket sql statistics stream string table tcp text textbox thread time timer update uploadatextfile usercontrol users validation view visualstudio webbrowser whileloop windows winforms wpf xml





