Line - DfBaseRichEdit
Returns specified line of text
Type: Function
Return Data Type: string
Parameters
| Parameter | Type | Description |
|---|---|---|
| iLine | integer | Number of line (zero-based) |
Syntax
Function Line integer iLine Returns string
Call Example
Get Line iLine to stringVariable
Description
Returns line of text with zero-based number iLine from control.
This method has no effect if control is not paged.
Sample
This sample gets the text of the current line in control oRichEdit1 and displays it to the user in a message box. The current line number is determined by calling function LineFromChar with a -1 parameter.
Procedure DisplayCurrentLine
integer iLineNum iCurrentLineNum
string sLine
// indicates that we want the current line
move -1 to iLineNum
// get the line number of the current line
get LineFromChar of oRichEdit1 iLineNum to iCurrentLineNum
// get the text of the current line
get Line of oRichEdit1 iCurrentLineNum to sLine
send Info_Box sLine ("Line number " + string(iCurrentLineNum))
End_Procedure // DisplayCurrentLine
Return Value
Text of specified line in control.