trichview.support
Re: Switching between text and RTF |
Author |
Message |
Etienne van Tonder |
Posted: 03/21/2003 4:46:06 Hi Sergey, That worked perfectly, I'm very impressed with your control so far and your great support. Regards, Etienne. "Sergey Tkachenko" <[email protected]> wrote in message news:[email protected]... > Switching to text: > > var s: String; > > s := GetAllText(rve); > rve.Clear; > rve.AddTextNL(0,0,0); > rve.DeleteUnusedStyles(True,True,True); // optional > rve.Format; > > (GetAllText is from http://www.trichview.com/support/files/rvgettext.zip) > > In text mode, you need to block all UI commands that can add formatting or > images. > Besides, you need to disable pasting anything but plain text from the > Clipboard (Outlook Express fails to do this). > Process OnPaste event: > > uses Clipbrd; > > procedure TForm1.rvePaste(Sender: TCustomRichViewEdit; > var DoDefault: Boolean); > begin > if Clipboard.HasFormat(CF_TEXT) then > Sender.InsertText(Clipboard.AsText); > DoDefault := False; > end; > > |
Powered by ABC Amber Outlook Express Converter