Function TWPRTFDataCursor.GetBlockStart(spos:Integer) : TParagraph
Unit: WPRTEDefs
Class: WPRTEDefs.TWPRTFDataCursor
Parameters
-
spos:Integer
Returns
The type of the result value is TParagraph.
Description
Retrieve the first paragraph in the selection.
spar:=WPRichText1.TextCursor.GetBlockStart(i);
epar:=WPRichText1.TextCursor.GetBlockEnd(l);
if (spar<>nil) and (epar<>nil) then
begin
epar.Insert(l, '',0);
spar.Insert(i, '',0);
WPRichText1.TextCursor.SelectFromHere(spar,i);
WPRichText1.TextCursor.SelectToHere(epar,l + Length(''));
WPRichText1.ReformatAll(false,true);
end;