trichview.support
Re: Switching between text and RTF |
Author |
Message |
Sergey Tkachenko |
Posted: 03/20/2003 23:06:26 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; > Hi, > > I'm currently developing a custom e-mail client and I'm thinking about using > RV as the control for the message body. In Outlook Express for example it's > possible to switch between Text and RTF(HTML) modes. When switching from RTF > to Text it removes all formatting, pictures, etc. How would I accomplish the > same functionality using RV. > > Thanks, > > Etienne. > > > |
Powered by ABC Amber Outlook Express Converter