Page 1 of 1

Style Templates

Posted: Thu Nov 03, 2005 1:45 pm
by wvd_vegt
Hi

Is there a demo of how to use Style Templates?

I want to restrict the user to use only predefined styles preferable stored outside the program in for example an ini file.

Posted: Thu Nov 03, 2005 2:51 pm
by Sergey Tkachenko
StyleTemplates are reserved for future use.

As for limiting a set of styles, right click the editor, choose "Settings" in the popup menu, select "Use a predefined set of styles".
After that, new styles will not be created when inserting/pasting RTF and RVF files. So, if you application does not have commands which add new styles, new styles will never be added in documents.

Posted: Fri Nov 04, 2005 12:30 pm
by wvd_vegt
Hi,

Can this be done at designtime too (through the inspector?)

Posted: Fri Nov 04, 2005 1:50 pm
by Sergey Tkachenko
Yes, the sequence I described must be done at design time.
You can change properties in the Object Inspector, but using a component editor ("Settings" in the context menu when you right click TRichView in Delphi) is simpler.