Results 1 to 4 of 4

Thread: Appending text to a RichTextBox Control

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 1999
    Location
    -
    Posts
    101
    1.] How can I append a formatted text to a RichTextBox
    Control? I've used the .TextRTF property but it seems not
    working. Here's what I did:

    RichTextBox1.TextRTF=RichTextBox1.TextRTF+RichSamp.TextRTF


    2.] How can I append a Text in the RichTextBox without
    referencing to the entire text. If you use

    RichTextBox1.TextRTF=RichTextBox1.TextRTF+RichSamp.TextRTF

    you are actually placing the entire text of the
    RichTextBox1 to the memory... right? What if my
    RichTextBox contains 500kb of text or more? Can I not have
    a pointer and points to the end of the text and place the
    text (formatted) right there without touching the other
    texts?
    icq: 16228887

  2. #2
    Guest
    I don't know what you are trying to do, but according to your subject, Appending text to a RichTextBox Control, it seems like you are trying to add to the end of it.

    Code:
    'Add to the end of a file, but start a new paragraph
    RichTextBox1.SelText = Chr$(13) & Chr$(10) & Chr$(13) & Chr$(10) & RichSamp.Text

  3. #3
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Matthew Gates is almost there, but to add formatted text use the SelRTF property:
    Code:
    RichTextBox1.SelStart = Len(RichTextBox1.Text)
    RichTextBox1.SelRtf = RichSamp.TextRTF
    Good luck!

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Oct 1999
    Location
    -
    Posts
    101
    Now I know how this RichTextbox Control works.
    Thanks to you guys!!!
    icq: 16228887

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