xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

WfLastCol()

Returns the right column position of the usable area in a formatted window.

Syntax

WfLastCol( [<lWidth>] ) --> nRightColumn

Arguments

<lWidth>
This parameter defaults to .F. (false) which causes the function to return the right column position of the formatted area in the selected window. When .T. (true) is passed, the function returns the width of the formatted area on the right side of the window.

Return

WfLastCol() returns the right column position of the formatted area in the current window, or the width of this area, as a numeric value.

Note:  when the window with ID 0 (entire screen) is selected, the return value is determined by WBoard().

Info

See also:WBox(), WLastCol(), WfCol(), WfLastRow(), WfRow(), WFormat()
Category: CT:Window , Windows (text mode)
Source:ct\ctwin.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example demonstrates return values of functions for window
// coordinates.

   PROCEDURE Main
      LOCAL nWin

      SET COLOR TO W+/B
      CLS

      nWin := WOpen( 5, 10, 15, 70 )
      WSelect( nWin )
      WFormat( 6, 11, 14, 68 )
      SET COLOR TO W+/R
      CLS

      ? WRow()     , WCol()                // result:  5  10
      ? WLastRow() , WLastCol()            // result: 15  70

      ? WfRow()    , WfRow(.T.)            // result:  6   1
      ? WfCol()    , WfCol(.T.)            // result: 11   2
      ? WfLastRow(), WfLastRow( .T. )      // result: 14   1
      ? WfLastCol(), WfLastCol( .T. )      // result: 68   2

      Inkey( 0 )
      WClose()
   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe