xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

SetPos()

Changes the position of the screen cursor in text mode.

Syntax

SetPos( <nRow>, <nCol> ) --> NIL

Arguments

<nRow>
This is a numeric value in the range of 0 to MaxRow(). It specifies the new row position to move the screen cursor to.
<nCol>
This is a numeric value in the range of 0 to MaxCol(). It specifies the new column position to move the screen cursor to.

Return

The return value is always NIL.

Description

The function SetPos() moves the screen cursor in text mode applications to the specified row and column coordinates. The new position is reflected by the functions Row() and Col(). Use function SetCursor() to change visibility and shape of the cursor.

The current screen cursor position is used by console commands and functions which do not recognize screen coordinates as starting point for display.

Info

See also:Col(), Row(), SET CURSOR, SetCursor(), SetPosBs()
Category: Screen functions
Source:rtl\setpos.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The displays the current positionof the screen cursor, changes it
// and displays a string at the new position.

   PROCEDURE Main
      CLS
      ? Row(), Col()

      SetPos( 13, 30 )
      ?? "New output goes here"

      ? Row(), Col()
   RETURN

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