Here's my version of a Unicode & RTF textbox.
It's about as full featured as you can get while using the RichTx32.ocx control.
Full Unicode and RTF editing while in the IDE design mode. Just right-click and "Edit" to paste in your Unicode/RTF text.
Every single event, property, and method is passed through (with the exception of the data bound properties).
It's actually a bit like a mini-Unicode-word-processor while you're in the IDE design mode. Be sure to take a look at the Sel... properties. Usually, with the regular RTF box, those are only available at runtime, but with this control, they're all available at design time as well. Mess with them while in "Edit" mode of the control, and you can format your text while you're typing it.
The only downside is that pasted text (while in "Edit" mode), must be RTF (or ascii). There can be Unicode embedded in the RTF, but you can't paste "raw" Unicode. So what does this mean? It means you can paste pretty much anything from WordPad (and Word), and it'll go straight in (Unicode and all). Because, in these circumstances, there'll be an RTF representation of the copy in the clipboard. However, Notepad can do Unicode but it doesn't do RTF. Therefore, if you try to copy-and-paste Unicode from the Notepad, it won't work. However, if you copy from Notepad, paste to WordPad, then copy the same text from WordPad, and then paste into this control, it'll work. That's because WordPad will give you an RTF representation of the Unicode.
From WordPad, you can even paste pictures into it.
Please let me know what you think of it and whether you see any problem/enhancements from which it may benefit. Also, if anyone can figure out the pure-Unicode pasting, I'd be delighted to listen.
Enjoy,
UnicodeTextbox.zip
It's about as full featured as you can get while using the RichTx32.ocx control.
Full Unicode and RTF editing while in the IDE design mode. Just right-click and "Edit" to paste in your Unicode/RTF text.
Every single event, property, and method is passed through (with the exception of the data bound properties).
It's actually a bit like a mini-Unicode-word-processor while you're in the IDE design mode. Be sure to take a look at the Sel... properties. Usually, with the regular RTF box, those are only available at runtime, but with this control, they're all available at design time as well. Mess with them while in "Edit" mode of the control, and you can format your text while you're typing it.
The only downside is that pasted text (while in "Edit" mode), must be RTF (or ascii). There can be Unicode embedded in the RTF, but you can't paste "raw" Unicode. So what does this mean? It means you can paste pretty much anything from WordPad (and Word), and it'll go straight in (Unicode and all). Because, in these circumstances, there'll be an RTF representation of the copy in the clipboard. However, Notepad can do Unicode but it doesn't do RTF. Therefore, if you try to copy-and-paste Unicode from the Notepad, it won't work. However, if you copy from Notepad, paste to WordPad, then copy the same text from WordPad, and then paste into this control, it'll work. That's because WordPad will give you an RTF representation of the Unicode.
From WordPad, you can even paste pictures into it.
Please let me know what you think of it and whether you see any problem/enhancements from which it may benefit. Also, if anyone can figure out the pure-Unicode pasting, I'd be delighted to listen.
Enjoy,
UnicodeTextbox.zip