trichview.com

trichview.support




Re: Default Text style


Return to index


Author

Message

Sergey Tkachenko

Posted: 04/11/2004 14:01:55


Styles will be automatically updated when loading or inserting documents.

But it's recommended to write some simple code for maintaining styles:

- It's recommended to call RichViewEdit.DeleteUnusedStyles(True,True,True)

after any call of RichViewEdit.Clear. This will delete any unnecessary

styles and reduce document size

- When you application creates a new document in RichViewEdit (File|New

command or something like this), it's recommended to create a default set of

styles for document. You can set a default font for new documents here.

For example:


procedure TForm1.New;

begin

  RichViewEdit1.Clear;

  RichViewEdit1.DeleteUnusedStyles(True,True,True);

  RVStyle1.TextStyles.Clear;

  with RVStyle1.TextStyles.Add do begin

     FontName := 'Times New Roman';

     Size := 10;

  end;

  RVStyle1.ParaStyles.Clear;

  RVStyle1.ParaStyles.Add;

  RVStyle1.ListStyles.Clear;

  RichViewEdit1.Format;

end;



>

> Does this means that I only need to assign a rvs to it without changing

any

> text styles properties in rvs?





Powered by ABC Amber Outlook Express Converter