Is it possible to append to a multiline textbox during runtime? I want to send periodic messages to the textbox, adding lines as the program is run.
Right now, it just overwrites when I use:
Text2.Text = "some comment"
Thanks.
Printable View
Is it possible to append to a multiline textbox during runtime? I want to send periodic messages to the textbox, adding lines as the program is run.
Right now, it just overwrites when I use:
Text2.Text = "some comment"
Thanks.
Sure!
Text1.Text = Text1.Text & vbCrLf & "New Text"
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
Thats cool, Thanks.
If the Text you display in the Textbox is going to build up to quite a size, you may want to consider adding text using the SelText Property instead.
This allows you to insert text into the Textbox, rather than redefining the entire contents, making it much quicker, eg.
Text1.SelText = "Some Additional Text"
SelText inserts text at the Caret position, so if it's adjustable by the user, you may want to make sure the Caret is at the end of the Textbox before using the SelText Property, ie. Text1.SelStart = Len(Text1)
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
Thanks for the additional method! (The loglines do add up pretty large in size)