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

Methods

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