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>wcol() window function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  WCOL()                                                     Window Function
 Purpose..: Return the real column co-ordinate given that for the window
-------------------------------------------------------------------------------
 Syntax...: wCol( [<uWin> [, <nCol>]] ) --> nABSCol

 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.

            [<nCol>] = relative column position in the window
                       to which to move the cursor. If this parameter
                       is not specified, it defaults to the current
                       column position in the window in focus.

 Returns..: <N> The absolute ( real ) screen column position.

 Remark...: It returns the the absolute screen column from the
            relative position indicated. If no relative column
            position was passed, the current absolute column position
            of the window is returned.

            The function works whether the window is open or not.

 Source...: WCOL.PRG
-------------------------------------------------------------------------------
 Example..: . The example uses wCol() in conjunction with wRow()
              to position a GET in the window in focus at the relative window
              co-ordinates of row 3, column 2.

            cName := space(25)
            wOpen ( "MyWin" )
            @ wRow( ,3 ), wCol( ,2 ) GET cName SHADOW
            READ MOUSE IN WINDOW

            . The example uses wCol() in conjunction with wRow()
              to display the cursor position on the screen.

            wOpen ( "MyWin" )
            @ wRow( ,0), wCol( ,1) say "Window Row 0, Column 1"
            @ wRow( ,1), wCol( ,1) say "Window Row 1, Column 1"
            @ wRow( ,2), wCol( ,2) say "Window Row 2, Column 2"
            @ wRow( ,2), wCol( ,3) say "Window Row 2, Column 3"
            @ wRow( ,1), wCol( ,4) say "Window Row 1, Column 4"

 Note.....: This is one of FreshWin's most powerful features as
            it creates a virtual windowing system. wRow() and wCol()
            are to be treated as replacements for the x and y of
            @ x, y. If the column position sent to wCol() is outside
            of the windows boundries, wCol() will default to column
            position 1.

See Also: wRow() wSay() wCurCol() wCurRow()

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