Function TParagraph.AppendPropertyGrid(Level:TAppendPropertyGridMode; aTitle:string; aName:string; Options:TAppendPropertyGridOptions; ColumnWidth:Integer; InplaceClass:string; ModifyCellCallback:TWPAppendGridCallback; Data:TObject) : TParagraph

Unit: WPRTEDefs
Class: WPRTEDefs.TParagraph

Parameters

Returns

The type of the result value is TParagraph.

Description

Creates a new property grid. If Level = wpNested, the grid will be created inside the given paragraph which should be a cell paragraph. If Level = wpSameLevel the grid will be created after the current data row or, if outside of a table, a new table will be created. With Level=wpLevelUp the grid can be created after the previous Level.
aTitle will be printed in the the second column. aName will be used as name for the first row.
FirstColumnWidth is the width of the first column with the drop down arrow. If FirstColumnWidth<0 it will the calclated on basis the current font width.
The result value is the second cell in the second row. Here data can be placed or a nested grid can be created.

This code creates a complete data entry form WPRichText1.ActiveParagraph.AppendPropertyGrid(wpLevelUp, 'Address','', [wpapShaded]) .AppendPropertyGrid(wpNested, 'Name') .AppendPropertyGrid(wpSameLevel, 'Str') .AppendPropertyGrid(wpSameLevel, 'City') .AppendPropertyGrid(wpLevelUp, 'Contact','', [wpapShaded]) .AppendPropertyGrid(wpNested, 'Telefone') .AppendPropertyRow('private') .AppendPropertyRow('mobile').SetProperty(WPAT_CharStyleON,WPSTY_BOLD).SetText('123456789') .AppendPropertyGrid(wpSameLevel, 'E-Mail') .AppendPropertyRow('private') .AppendPropertyRow('business');
If the option flag wpapCreateInplaceEditor was used, a parameter FieldFormat will be used to create an inplace editor right away.