Liberty BASIC Help Online

LOCATE
LOCATE has two uses.  The first usage listed here locates a control on its parent window.  The second usage is for the mainwin only.
 
LOCATE CONTROLS
 
  print #handle.ext, "locate x y width height"
or
  print #handle.ext, "!locate x y width height"
 
Description
This command for windows of type "window" causes a control to be moved and/or resized.  Always issue a REFRESH command after the LOCATE command to cause the window to be repainted to reflect the control's new position and size.  For a demonstration, see Resize.bas.
 
Usage:
  print #handle.ext, "locate 20 12 300 200"
or
  x = 20 : y = 12 : width = 300 : height = 200
  print #handle.ext, "locate ";x;" ";y;" ";width;" ";height"
 
 
See also:  RESIZEHANDLER, REFRESH Window and Dialog Commands
 
LOCATE IN MAINWINDOW
 
  locate x, y
 
Description:
Using LOCATE in the mainwin causes text to be printed at the x, y location specified.  These coordinates refer to the column and row of text, not to screen pixels.  This command functions in the same was as the Qbasic LOCATE command and is used to position text on the mainwin.  Here is a short demo:
 
  'plot a wave
  for x = 1 to 50
    i = i + 0.15
    locate x, 12 + int(cos(i)*10)
    print "*";
  next x


Copyright (C) 2003 Shoptalk Systems
Liberty BASIC - http://www.libertybasic.com/