Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FreshWin (c) Fresh Technologies - <b>wwidth() window function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  WWIDTH()                                                   Window Function
 Purpose..: Return a window's width
-------------------------------------------------------------------------------
 Syntax...: wWidth( [<uWin>] ) --> nWidth

 Arguments: [<uWin>]   = the string identifier of the window
                         OR the reference to the window structure
                         returned as an array by wNew() or wArray().
                         If not passed, the function will operate on
                         the window in focus.

 Returns..: <N> The number of columns in the text display region
                of the window.

 Remark...: The function works whether the window is open or not.

 Source...: WWIDTH.PRG
-------------------------------------------------------------------------------
 Example..: . The example uses wWidth() in conjunction with
              wSay() and wLength() to display consecutive numbers for
              as many columns as exist in the text area of the current
              window on the window's center row. Two is taken away
              from wWidth() to account for the right and left
              frame fragments.

            for nCount := 1 to wWidth() - 2
               wSay( , , int( wLength() /2 ), nCount,  str( nCount, 1 ) )
            next

 Note.....: The routine can be used in conjunction with its counterpart,
            wLength(), to put a message in the middle of a window.

See Also: wLength() wTRow() wLCol() wBRow() wRCol() wSay()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson