<< Click to display table of contents >>


Scrolls to make the specified item visible. Optionally moves the caret to this item.

function ScrollToItem(RVData: TCustomRVFormattedData; ItemNo: Integer;

  SetCaret: Boolean = True; ToItemEnd: Boolean = False;

  ToItemCenter: Boolean = False; SmoothScroll: Boolean = False): Boolean;

The item location

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

Moving the caret

If SetCaret=True, the method not only scrolls the window, but also moves the caret to the specified item. The caret is moved either to the beginning of this item (if ToItemEnd=False) or to the end of it (if ToItemEnd=True).


If ToItemCenter=False, the method scrolls so that the item top is shown at the top of the editor window,

If ToItemCenter=True, the method scrolls so that the item middle is shown at the middle of the editor window.

If SmoothScroll = True, a smooth scrolling effect is applied.

See also:

ScrollToCaret, ScrollCaretToCenter