Syntax
WFRow( [lRelative] ) --> nRowArguments
lRelative
.T. returns the number of rows of the margin between the border of the window and the usable area instead of the screen position. The default is .F.
Return value
The screen row of the top of the usable area, or with lRelative the top margin.
Description
WFRow(), WFCol(), WFLastRow() and WFLastCol() give the usable area of the selected window, which WFormat() and WBox() make smaller than the window. The margins returned with lRelative can be passed later to WFormat() to set the same usable area again.
Notes
In window 0, the screen, the function gives the area set by WBoard().
Example
#if OS_LINUX
REQUEST GTXWC
#else
REQUEST GTWVT
#endif
PROCEDURE Main()
LOCAL nValue, nMargin
Scroll()
SetPos( 0, 0 )
WOpen( 12, 10, 20, 70 )
WBox()
DispOutAt( 0, 0, "The usable area starts here" )
nValue := WFRow()
nMargin := WFRow( .T. )
WSelect( 0 )
Check( 'WOpen( 12, 10, 20, 70 ), WBox(), WFRow() ', nValue, 13 )
Check( 'WFRow( .T. ) ', nMargin, 1 )
Check( 'WFRow() in window 0 ', WFRow(), 0 )
Check( 'WFRow( .T. ) in window 0 ', WFRow( .T. ), 0 )
QOut( "" )
QOut( "Any key or 10 seconds ends the program" )
Inkey( 10 )
RETURN
STATIC PROCEDURE Check( cTitle, xResult, xExpected )
QOut( cTitle + IIF( xResult == xExpected, "OK", "ERROR" ) )
RETURNOutput