wxPython: Copying text from RichTextCtrl
I've been trying to figure out how to copy rich text from a RichTextCtrl to the clipboard. I'm able to copy the text just fine, but not the rich text information. For exam开发者_如何学编程ple, if I copy some bold text from my RichTextCtrl and then paste it in to another program, it is just plain text.
Any ideas?
Thanks, Peter
Take a look at the PyRTFParser project.
From the project website:
...the Cut, Copy, and Paste methods in the RichTextCtrl support only plain text, not formatted text
Cut / Copy / Paste of RTF-formatted text through the clipboard between Word on Windows and Word and TextEdit on OS X has been implemented in the PyRTFParserDemo.py file.
精彩评论