Ticket Q422760
Visible to All Users

How do i insert RTF-formated text into cxrichedit

created 13 years ago

Hello,

the subject describes the problem i have.
I want to insert some RTF-formated text into a cxrichedit at the current cursor position.
My first attempt was to insert the text with the SelText property. The result is that the RTF text is displayed as plaintext with format-characters.
The second try was to use a second cxrichedit to use the methods Copytoclipboard and PastefromClipoard.
This try works but not on every machine. After some tests i figured out that the problem might be the PastefromClipoard method.
Every x(5-10) times it works.

Now i need a solution how to figure out my Problem.

A simple project is attached.

Thanks for your help

Answers

created 13 years ago (modified 13 years ago)

Hello Marc,
Thank you for your message. You can insert RTF-formatted text into TcxRichEdit at the current cursor position using the following approach:
In this approach, it is necessary to store the text to the stream, add the resmSelection option to the TcxRichEdit.Properties.StreamModes list options, and load from the stream to TcxRichEdit.
Attached is your modified example that demonstrates this approach in action. I hope this helps you achieve the required functionality.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.