trichview.support
Re: Create a RichViewEdit In memory? |
Author |
Message |
Sergey Tkachenko |
Posted: 07/10/2004 11:44:48 Yes, you can create RichViewEdit at run time. There are 3 important issues: 1) Even if you want invisible TRichView, it must have assigned Parent (parent is necessary for some operations) 2) When you create RichView at run time, initial values of properties are not the same as if you place it first time on the form from the Delphi component palette. When you create it from the Component palette, some properties are set to values defined in the component editor (right click RichView in Delphi, choose "Settings" in the context menu to view/change these values). 3) Do not forget to create and assign TRVStyle component as well var rv: TRichViewEdit; rvs: TRVStyle; rv := TRichViewEdit.Create(Form1); rv.Parent := Form1; rv.SetBounds(Left, Top, Width, Height); rvs := TRVStyle.Create(Form1); rv.Style := rvs; // some property settings rv.RVFOptions := rv.RVFOptions+[rvfoSaveTextStyles,rvfoSaveParaStyles]; rv.Options := rv.Options + [rvoTagsArePChars]; rv.RTFReadProperties.TextStyleMode := rvrsAddIfNeeded; rv.RTFReadProperties.ParaStyleMode := rvrsAddIfNeeded; It's not necessary to free rv and rvs explicitly - they will be freed together with Form1. > > Create a RichViewEdit In memory? |
Powered by ABC Amber Outlook Express Converter