[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 WCOL()
 Returns the position of the leftmost column of the active window
------------------------------------------------------------------------------
 Syntax

     WCOL([<lAfterWCENTER>]) --> nCol

 Argument

     <lAfterWCENTER>  Designates an optional parameter.  If this
     parameter is .T., the function returns what the position of the leftmost
     column of a window would be after a call of WCENTER().  (The function
     does not call WCENTER())  The default value (.F.) returns the current
     position.

 Returns

     WCOL() returns the coordinate relative to the leftmost column of the
     selected window.

 Description

     This function allows you to determine the current position of the
     leftmost column of the selected window.  This allows you to save a
     window's position if the window was moved previously with the cursor
     keys.  This way the window can later be reopened at exactly the same
     position.

     Additionally, by passing the optional parameter with a .T., you can
     determine what the window position would be after a WCENTER() without
     actually calling WCENTER().

 Note

     .  Values can be negative.  Negative values place the first
        column outside of the visible range.

 Example

     This program saves the position of a window, then reopens it in that
     position:

     nTop  :=  10
     nLeft :=  15
     WOPEN(nTop, nLeft, nTop + 10, nLeft + 40)

     * Someone moves the window!

     nTop := WROW()                     // Save the current
     nBottom := WCOL()                  // position of upper left
     WCLOSE()                           // corner and close the window

     * Other program sections

     WOPEN(nTop, nLeft, nTop + 10, nLeft + 40)   // Open w/old values


See Also: WOPEN() WSELECT() WROW() WMODE()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson