Function TParagraph.AppendInplaceEditor(InplaceClass:string; FieldWidth:Integer; FieldHeight:Integer; CharAttrIndex:Cardinal) : TWPTextObj
Unit: WPRTEDefs
Class: WPRTEDefs.TParagraph
Parameters
-
InplaceClass:string FieldWidth:Integer FieldHeight:Integer CharAttrIndex:Cardinal
Returns
The type of the result value is TWPTextObj.
Description
This function creates an inplace editor in a paragraph. Please note that it is not visible until reformat has been preformed.
procedure TForm1.Createcheckbox1Click(Sender: TObject);
var obj : TWPTextObj;
begin
obj := WPRichText1.ActivePar.AppendInplaceEditor(inplfrmID_check);
obj.Width := 1200;
obj.InplaceEditor.group := 4;
obj.InplaceEditor.number := 1;
obj.InplaceEditor.SetGUIProp(WPINPL_CHECK_PRP_ALIGNMENT, 2);
obj.InplaceEditor.SetGUIProp(WPINPL_PRP_ID_V_PADDING, 4);
obj.InplaceEditor.SetGUIProp(WPINPL_PRP_ID_H_PADDING, 0);
// obj.InplaceEditor.SetGUIProp(WPINPL_CHECK_RADIO_GROUPLEVEL, CHK_RADIO_DOCUMENT ); // by Document
// obj.InplaceEditor.SetGUIProp(WPINPL_CHECK_RADIO_BY_PARAGRAPH, 1 ); // if selected, all others are not
obj.InplaceEditor.SetGUIStrProp( WPINPL_PRP_ID_CAPTION, ' CHECK' );
obj.InplaceEditor.SetGUIProp(WPINPL_PRP_ID_COLOR, $00FFA0);
WPRichText1.ReformatAll(false, true);
end;