Results 1 to 5 of 5

Thread: Sending text to a multiline Textbox

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 1999
    Location
    Princeton, New Jersey
    Posts
    46

    Post

    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.

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Sure!

    Text1.Text = Text1.Text & vbCrLf & "New Text"

    ------------------

    Serge

    Software Developer
    Serge_Dymkov@vertexinc.com
    Access8484@aol.com
    ICQ#: 51055819


  3. #3

    Thread Starter
    Member
    Join Date
    Nov 1999
    Location
    Princeton, New Jersey
    Posts
    46

    Post

    Thats cool, Thanks.

  4. #4
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,176

    Post

    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
    aarony@redwingsoftware.com
    adyoung@win.bright.net

  5. #5

    Thread Starter
    Member
    Join Date
    Nov 1999
    Location
    Princeton, New Jersey
    Posts
    46

    Post

    Thanks for the additional method! (The loglines do add up pretty large in size)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width