function GetPositionOf

    • Offizieller Beitrag

    function GetPositionOf(LineNr, ColNr: Longint): Longint;

    is not there anymore.

    You can use CPLineNr to move to a certain line if that helps.

    There are also some functions in TWPRtfDataBlock (WPRichText.ActiveText for example),

    {:: This function calculates numbers which can later be used with ParagraphFind }
    procedure GetParagraphNr(par: TParagraph; var FirstLevelNr, SecondLevelNr, ChildNr: Integer);

    {This function counts the characters from the begining of the text until the provided paragraph and then adds the povided position. If the paragraph was not found the Result value = -1. Note: all paragraphs care counted as CharCount + 1 for the Carriage Return.
    Please note that tables and table rows also add 1 to the sum - although they are not visible }

    function GetPosition(par: TParagraph; posinpar: Integer): Integer;

    {:: This function calculates a paragraph reference for a certain position. If the position was not found the last paragraph is returned }

    function SetPosition(pos: Integer; var PosInPar: Integer): TParagraph;