<< Click to display table of contents >>


Returns coordinates of the item in RichView document.

function GetItemCoordsEx(RVData: TCustomRVFormattedData; ItemNo, Part: Integer;

  AllowFloating: Boolean; out R: TRect): Boolean;

(introduced in version 14)


Input parameters:

RVData, ItemNo define the position of the item. RVData an object containing this item (RichView.RVData or table cell or RVData of cell inplace editor). ItemNo an index of the item (in the items list of RVData).

Part the item part. For non-text items and text items occupying a single line, it should be 0. For text items occupying more than one line, Part must be 0 for the first line, 1 for the second line and so on (you can call this method until it returns False for a non-existing part).

AllowFloating specifies which coordinates should be returned for left- and right-aligned objects. If True, coordinates of a floating object are returned. If False, coordinates of a placeholder in a text are returned.

Output parameters:

R coordinates of the item (or item part), in pixels. These are document coordinates, i.e. (0,0) is in the top left corner of the scrollable area. If you need client coordinates, convert R.TopLeft and R.BottomRight using DocumentToClient.

The method must be called only when the document is formatted.

This method takes cell rotation into account.


Return value:

True if coordinates were successfully retrieved (document must be formatted; and Part must be valid).


See also: