Skip to content

FirstVisibleLine - DfBaseRichEdit

Returns number of first visible line

Type: Function
Return Data Type: integer

Syntax

Function FirstVisibleLine Returns integer

Call Example

Get FirstVisibleLine to integerVariable

Description

Returns zero-based number of the first visible line in the control.

This function is useful if the user scrolls down in a document that is longer than the visible area of the control. For example, if the user scrolls down until the first 5 lines of the control are no longer visible, FirstVisibleLine will return 5 (rather than 6, since FirstVisibleLine is zero-based).

This method has no effect if control is not paged.

Sample

This sample gets the first visible line in the oRichEdit1 control and displays it to the user in a message box.

Procedure DetermineFirstVisibleLine
    integer iFirstVisibleLine

    get FirstVisibleLine of oRichEdit1 to iFirstVisibleLine

    send Info_Box ("The first visible line is: " + string(iFirstVisibleLine))
End_Procedure  // DetermineFirstVisibleLine

Return Value

Zero-based number of the first visible line.