Function TWPCustomRtfEdit.FieldGetInPar(par:TParagraph; posinpar:Integer) : TWPTextObj

Unit: WPCTRMemo
Class: WPCTRMemo.TWPCustomRtfEdit

Parameters

Returns

The type of the result value is TWPTextObj.

Description

Get the field which contains the text in the given paragraph at the given position. If the given position actually is a mergefield start or end tag it is returned, too!
This function is implemented as: function TWPCustomRtfEdit.FieldGetInPar(par: TParagraph; posinpar: Integer): TWPTextObj; begin if (par=nil) or (posinpar<0) then Result := nil else begin Result := par.ObjectRef[posinpar]; if (Result<>nil) and (Result.ObjType=wpobjMergeField) then exit; Result := CodeInsideOf(par, posinpar, wpobjMergeField); end; end;