TSRichViewEdit.GetItemCoords100

<< Click to display table of contents >>

TSRichViewEdit.GetItemCoords100

The methods return the coordinates of the specified item or its part.

function  GetItemCoords100(RVData: TCustomRVFormattedData;

  ItemNo: Integer; var ALeft, ATop: Integer;

  var PageNo: Integer; Part : Integer = -1;

  AllowFloating: Boolean = True): Boolean;

Input parameters

RVData is a document (RichViewEdit.RVData, table cell, or cell inplace editor's RVData), ItemNo is an index of item in this document.

If Part=-1, the result is returned for the whole item. Otherwise, it is returned for the specified item part, counted from 0. A text item may have more than one part if drawn on several lines. To enumerate all parts, start calling this method from Part=0 and increase this value until the method returns False. You can use the function RichViewEdit.RVData.GetItemPart to get the item part for the position in the document.

The returned coordinates are relative to the top left corner of the item's (or part's) page (see GetItemPages). If the item spans across several pages (it is possible only if Part=-1), the top left corner is relative to the first item page, the bottom left corner is relative to the last item page.

Coordinates are not scaled (they correspond to zooming = 100%).

AllowFloating defines which coordinates are returned for left- and right-aligned items (for all other items, this parameter is ignored). If True, the method returns coordinates of an object (such as an image or an control). If False, the method returns coordinates of a placeholder, i.e. coordinates of the point of insertion of this object in a line.

 

See also:

GetItemBounds, GetItemBounds100