Class TWPColTemplate
Hierarchy
System.TObject | System.Classes.TPersistent | System.Classes.TCollectionItem | WPRTEDefs.TWPCollectionItem | TWPColTemplate
Subclasses
WPCTRTextProducerDB.TWPColTemplateDB
Description for Class TWPCollectionItem
Add Interface support to TCollectionItems - this helps for property editors. Unlike with interface objects the object is NOT destroyed when the interface refcount reaches 0.Properties
Property RowCountValue : Integer
Property SumValue : Extended
Methods
Function AddStyle(samplestyle:TWPTextStyle) : TWPTemplateStyle
Function AllowObjectSelection(txtobj:TWPTextObj) : Boolean
Procedure Assign(Source:TPersistent)
Procedure ChangeApplied(Editor:TObject; par:TParagraph; posinpar:Integer)
Function Changing(Editor:TObject; par:TParagraph; posinpar:Integer) : Boolean
Create(Collection:TCollection)
Procedure GetColText(Group:TWPBlockTemplateGroupObj; aText:string; state:TWPAdapterCellStates)
Procedure GetColTitle(Group:TWPBlockTemplateGroupObj; aText:string; state:TWPAdapterCellStates)
Function GetDisplayName : string
Function GetUIOptions : Integer
Procedure InitColText(Group:TWPBlockTemplateGroupObj; Par:TParagraph; state:TWPAdapterCellStates)
Function IsValidChar(Editor:TObject; par:TParagraph; posinpar:Integer; AKey:Char) : Boolean
Function MoveCursor(Editor:TObject; par:TParagraph; posinpar:Integer) : Boolean
Procedure Reset(Editor:TObject; par:TParagraph)
Procedure SetColText(Par:TParagraph)
Events
OnGetImage : TWPColTemplateGetImageEvent= TWPColTemplateGetImageEvent
This event is used to create an image in cells which use the Option wpcoContainImage
OnGetSummary : TWPColTemplateGetTextEvent= TWPColTemplateGetTextEvent
This event is used to read the text for the footer and summary cells. Usually both cannot be combined. Footer are repeated on every page while Summaries are created at the end of the table
OnGetText : TWPColTemplateGetTextEvent= TWPColTemplateGetTextEvent
This event is used to read the text for this data cell
OnGetTitle : TWPColTemplateGetTextEvent= TWPColTemplateGetTextEvent
This event is used to read the text for this label or header cell
OnSetText : TWPColTemplateSetTextEvent= TWPColTemplateSetTextEvent
The event OnSetText is triggered outside of any groups. It can be used to update the text for a field in a database. The relevant record numbers can be retrieved by checking out the name of the ParentRow.Name of the respective table cell which has been passed as parameter "par". For automatic update of the text activate the property "UpdateField" of the TWPColTemplateDB class.
OnUpdateCell : TWPColTemplateUpdateCellEvent= TWPColTemplateUpdateCellEvent
This event is triggered for all template(!) cells after their creation to allow the customization. In this case
wpIsTemplateCell is set in CellMode.
It is also created after the cells were added to the table so it is possible to customize the cells in
a last step. In this case wpIsTemplateCell is not set.
procedure TForm1.WPTableProducerDB1Blocks0Columns0UpdateCell(
Sender: TWPColTemplate; aCell: TParagraph; CellMode: TWPColTemplateCellMode);
begin
if (wpIsHeaderCell in CellMode) and not (wpIsLabelCell in CellMode) then
aCell.SetText('');
end;
if not (wpIsTemplateCell in CellMode) and (aCell.StartWithW('A')) then
begin
WPAT_UseTemplate[WPAT_BGColor] := false;
aCell.ASetColor(WPAT_BGColor, clYellow);
end;
Used or referenced by
-Property TWPEditLinkParagraphObj.EditLink : TWPCollectionItem |
-Property TWPEditLinkParagraphObj.EditLink : TWPCollectionItem |
-Function TWPBlockTemplateDB.AddColumn(aFieldName:string; style:TWPTextStyle) : TWPColTemplate |