1.

Solve : appending a multiline textbox in VB???

Answer»

basically i need the code for this situation

i have something in line 1, 2, 3, and so on and i need to add something to the next line, whatever it might be. I've looked around and all I can find is skipping lines with the same command. What I WANT is with each new event I want it to input the event description into my TEXT box.okay well never mind on the last part because i got it but now I need to have it scroll to the last line in the textbox when a line is added.Quote from: gamerx365 on September 18, 2008, 04:51:19 PM

okay well never mind on the last part because i got it but now I need to have it scroll to the last line in the textbox when a line is added.

now that i think about it I'll add details:

Using VB Express 2005

and my current code for adding text is:
Code: [Select]advconsole.Text = advconsole.Text & vbCrLf & "Advanced CONSOLE disabled"
This is with VB.NET in Visual Studio 2005

Code: [Select]RichTextBox.AppendText(vbCrLf & "This is a test")
RichTextBox.ScrollToCaret()

If you USE AppendText() you don't need to grab the current text in the box. ScrollToCaret() moves to the current position of the caret which, immediately after appending text, is at the bottom.dude thank you. LOLZ. of course i had like 30 lines of code that I had to go back and edit but thank you lolz.


Discussion

No Comment Found