TSRichViewEdit.FindPriorItem

<< Click to display table of contents >>

TSRichViewEdit.FindPriorItem

Finds the location of the next item of the specified styles (types).

function FindPriorItem(StyleNo: array of Integer; 

  var RVData: TCustomRVData; var ItemNo: Integer) : Boolean;

The search can be limited to the specified range of coordinates, see RangeSearch.

Input parameters:

StyleNo – a list of styles (types) for searching.

RVData, ItemNo – starting position for the search. The search starts from the previous item. RVData is a document (RichViewEdit.RVData, table cell, or cell inplace editor's RVData; if the cell is edited, it must be an inplace editor's RVData), ItemNo is an index of item in this document.

Output parameters:

RVData, ItemNo – position of the found item. Valid only if the method returns True.

Return value:

True if found.

Example:

var

  RVData: TCustomRVData;

  ItemNo: Integer;

  ...

  // searching for the last image in the document

  RVData := SRichViewEdit1.RichViewEdit.RVData;

  ItemNo := SRichViewEdit1.RichViewEdit.ItemCount;

  if SRichViewEdit1.FindPriorItem(

    [rvsPicture, rvsHotPicture, rvsBullet, rvsHotspot],

    RVData, ItemNo) then

    ...

See also:

FindNextItem

PriorCurItem

FindPriorCheckpoint

FindPriorHyperlink