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>wshift() screen function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  WSHIFT()                                                   Screen Function
 Purpose..: Shift a window in one direction or diagonally
-------------------------------------------------------------------------------
 Syntax...: wShift( [<uWin>], <nR>, <nC>  ) --> lWasMoved

 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.

 Arguments: <nR>     = number of rows to shift the window.
                       A positive number will shift down and
                       a negative number will shift up. If no shift
                       up or down is needed, enter a zero.
                       There is no default.

            <nC>     = number of columns to shift the window.
                       A positive number will shift right and
                       a negative number will shift left. If no shift
                       right or left is needed, enter a zero.
                       There is no default.


 Returns..: <L> lWasMoved is true if the move is successful.

 Remark...: If you try to use wShift() to move to a place
            beyond the screen range, the window does NOT move at all.
            For example, if the LCol and BRow of the window
            are at 79, 23 respectively and you try
            wShift( , 0, -5 ), the window will not be moved.

            The function works whether the window is open or not.

 Source...: WMOVE.PRG
-------------------------------------------------------------------------------
 Example..: . The examples show how to move in a square.

              wShift( "AKA", -1,  0 )  // shift "AKA" UP one row.
              wShift( "AKA",  0, -1 )  // shift "AKA" LEFT one column.
              wShift( "AKA",  1,  0 )  // shift "AKA" DOWN one row.
              wShift( "AKA",  0,  1 )  // shift "AKA" RIGHT one column.

              wShift( "AKA", -2,  2 )  // shift "AKA" UP & RIGHT two.

            As with all FreshWin window functions that alter the display,
            this function hides and redisplays automatically the mouse
            cursor if it is active.

See Also: wMove() wReSize() wZoom()

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