GOTO XY

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 3


GOTO XY (x; y)

ParameterTypeDescription
xNumberx (horizontal) position of cursor
yNumbery (vertical) position of cursor

Description

The GOTO XY command is used in conjunction with the MESSAGE command when you display messages in a window opened using Open window.

GOTO XY positions the character cursor (an invisible cursor) to set the location of the next message in the window.

The upper-left corner is position 0,0. The cursor is automatically placed at 0,0 when a window is opened and after ERASE WINDOW is executed.

After GOTO XY positions the cursor, you can use MESSAGE to display characters in the window.

Tip: Using a fixed-width (monospaced) font, such as Terminal on Windows and Monaco on Macintosh, for the message, gives the best display results with GOTO XY and MESSAGE. See the description of the MESSAGE command for more information.

Examples

1. See example for the command MESSAGE.

2. See example for the command Milliseconds.

3. The following example:

   Open window(50;50;300;300;5;"This is only a test")
   For ($vlRow;0;9)
      GOTO XY($vlRow;0)
      MESSAGE(String($vlRow))
   End for 
   For ($vlLine;0;9)
      GOTO XY(0;$vlLine)
      MESSAGE(String($vlLine))
   End for 
   $vhStartTime:=Current time
   Repeat 
   Until ((Current time-$vhStartTime)>†00:00:30†)

displays the following window (on Macintosh) for 30 seconds:

See Also

MESSAGE.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next