[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
WROW()
Returns the position of the top row of the active window
------------------------------------------------------------------------------
Syntax
WROW([<lAfterWCENTER>]) --> nRow
Argument
<lAfterWCENTER> Designates an optional parameter. If this
parameter is .T., the function returns what the postion of the top row
of a window would be after a call of WCENTER(). (This function does not
call WCENTER().) The default value (.F.) returns the current position.
Returns
WROW() returns the row of the currently selected window, relative to the
physical screen.
Description
WROW() determines the current position of the top row of the currently
selected window. This allows you to save a window position for a window
that was moved previously using the cursor keys or WMOVE(). You can
later reopen the window at exactly this position.
If you used invalid parameters with WMOVE() to move a window, WROW()
lets you determine the current window position. WROW() is particularly
helpful since WMOVE() automatically adapts to the invalid parameters.
WROW() can also be helpful after you use the WCENTER() function. The
new coordinates can be determined using WROW() and WCOL().
Additionally, with the specification of the optional parameter, you can
determine the position of a window after a call of WCENTER() without
actually calling WCENTER().
Note
. The value returned can be negative. If so, the first row is
outside of the visible area.
Example
This program can determine the position of the window at all times:
nTop := 10
nLeft := 15
WOPEN(nTop, nLeft, nTop + 10, nLeft +40)
* Someone moved the window!
nTop := WROW() // Save the current position
nLeft := WCOL() // of the upper left corner
WCLOSE() // Close the window
* Other program sections
WOPEN(nTop, nLeft, nTop + 10, nLeft + 40) // Open with old
// values
See Also:
WOPEN()
WSELECT()
WCOL()
WMODE()
WLASTCOL()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson