Save two richtextbox contents into a file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ang

    Save two richtextbox contents into a file

    Hi,

    How can I save two richtextbox contents into a file?

    if simply join two richtextboxes like joining two string, the output
    file will not show the value of second richtextbox.

    Thanks for reply.

    *** Sent via Developersdex http://www.developersdex.com ***
  • Michael Justin

    #2
    Re: Save two richtextbox contents into a file

    if simply join two richtextboxes like joining two string, the output
    file will not show the value of second richtextbox.
    Solution 1:

    Check the RTF format specification. If you manage to extract the text
    body part of the second RTF document, you can insert it just before the
    last closing "}" character of the first document.

    The tricky part is to find the start of the text body: save the RTF to a
    file and open it with notepad. If you can find the first location of a
    "\plain" or "\pard" token, try to extract everything from there until
    the end (without the last "}")

    Solution 2:

    Short description: create an invisible RichTextBox and use the clipboard
    methods to copy and paste the content of the two other RichTextBoxes
    into this box.

    Hope this helps (tm)
    --
    Michael Justin
    SCJP, SCJA
    betasoft - Software for Delphiâ„¢ and for the Javaâ„¢ platform
    http://www.mikejustin.com - http://www.betabeans.de

    Comment

    Working...