Description
Scrolls to the document instance associated with the specified row when the RichTextEdit controls shares data with a DataWindow.
For syntax specific to DataWindow controls and child DataWindows, see the ScrollToRow method for DataWindows in the section called “ScrollToRow” in DataWindow Reference.
Applies to
RichTextEdit controls
Syntax
rtename.ScrollToRow ( row )
Argument |
Description |
---|---|
rtename |
The name of the RichTextEdit control in which you want to scroll to a document instance associated with the specified row. |
row |
A long identifying the row to which you want to scroll. If row, is 0, ScrollToRow scrolls to the first row. If row is greater than the number of rows in the associated DataWindow, it scrolls to the last row. |
Return value
Integer.
Returns 1 if it succeeds and -1 if an error occurs.
Usage
When the RichTextEdit shares data with a DataWindow, the RichTextEdit contains multiple instances of the document, one instance for each row. ScrollToRow goes to the instance associated with the specified row.
Examples
In this example, dw_1 has retrieved at least 25 rows of data. After calling DataSource, the RichTextEdit control contains at least 25 instances of its document. ScrollToRow scrolls to the 25th instance:
rte_1.DataSource(dw_1) rte_1.ScrollToRow(25)
See also