Class TWPStyleCollection
Hierarchy
System.TObject | System.Classes.TPersistent | System.Classes.TComponent | TWPStyleCollection
Description
The TWPStyleCollection can be used to store paragraph styles which should be used by the editor. In WPTools5 the TWPStyleCollection is nothing more than a container for paragraph styles, it is not requiredThe editor component has its own collection of paragraph styles which is accessible through procedure TStyleDemo.FormShow(Sender: TObject); begin WPStyleCollection1.Update; end;Saving the current style sheet:WPStyleCollection1.ReadStyles(WPRichText1); WPStyleCollection1.SaveToFile('c:\styles.ini');Loading a style sheet:WPStyleCollection1.LoadFromFile('c:\styles.ini'); WPStyleCollection1.Update(WPRichText1.HeaderFooter.RTFProps);Properties
Property AsString : string
Property NumberingControlledByStyles : Boolean
Methods
Function Add(StyleName:string) : TWPParStyle
Procedure AppendFromFile(FileName:string)
Procedure AppendFromString(Source:string)
Function Find(StyleName:string) : TWPParStyle
Procedure LoadFromFile(FileName:string)
Procedure LoadFromStream(Stream:TStream; IsINIFormat:Boolean)
Procedure ReadStyles(SourceEditBox:TWPCustomRtfEdit)
Procedure SaveToCSSStream(Stream:TStream)
Procedure SaveToFile(Filename:string)
Procedure SaveToINIStream(Stream:TStream)
Procedure SaveToStream(Stream:TStream)
Function StyleByName(StyleName:string) : TWPParStyle
Function StyleCount : Integer
Procedure Update(DestRTFProps:TWPRTFProps; OnlyModified:Boolean)
Events
OnChangeStyle : TWPStyleCollectionChangeStyleEvent= TWPStyleCollectionChangeStyleEvent
OnChangeStyleList : TNotifyEvent= procedure (Sender : TObject) of Object
Used or referenced by
-Property TWPParStyle.StyleCollection : TWPStyleCollection |