Syntax
WMode( [lTop], [lLeft], [lBottom], [lRight] ) --> nErrorArguments
lTop
.T. allows moving windows over the top border, .F. forbids it.
lLeft
.T. allows moving windows over the left border, .F. forbids it.
lBottom
.T. allows moving windows over the bottom border, .F. forbids it.
lRight
.T. allows moving windows over the right border, .F. forbids it.
Return value
Always 0.
Description
The borders are those of the area set by WBoard(). A missing argument keeps the setting of its border.
The setting is valid for all windows and for every later WMove(). At the start all four borders are forbidden, so WMove() keeps windows completely visible. With a border allowed, a window can move partly or completely over it.
Notes
WMode() can be called while windows are open; it does not move them.
Example
#if OS_LINUX
REQUEST GTXWC
#else
REQUEST GTWVT
#endif
PROCEDURE Main()
LOCAL nResult, nRowOver, nColOver, nRowInside, nColInside, nColLeft
Scroll()
SetPos( 0, 0 )
WOpen( 12, 10, 16, 40, .T. )
WBox()
DispOutAt( 1, 1, "Half over the left border" )
nResult := WMode( .T., .T., .T., .T. )
WMove( -2, -5 )
nRowOver := WRow()
nColOver := WCol()
WMode( .F., .F., .F., .F. )
WMove( -2, -5 )
nRowInside := WRow()
nColInside := WCol()
WMode( , .T. )
WMove( 14, -15 )
nColLeft := WCol()
WSelect( 0 )
Check( 'WMode( .T., .T., .T., .T. ) ', nResult, 0 )
Check( 'WMove( -2, -5 ), WRow() ', nRowOver, -2 )
Check( 'WMove( -2, -5 ), WCol() ', nColOver, -5 )
Check( 'WMode( .F., ... ), WRow() ', nRowInside, 0 )
Check( 'WMode( .F., ... ), WCol() ', nColInside, 0 )
Check( 'WMode( , .T. ), WCol() ', nColLeft, -15 )
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