|Liberty BASIC Help Online
LOCATE has two uses. The first usage listed here locates a control on its parent window. The second usage is for the mainwin only.
print #handle.ext, "locate x y width height"
print #handle.ext, "!locate x y width height"
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.
print #handle.ext, "locate 20 12 300 200"
x = 20 : y = 12 : width = 300 : height = 200
print #handle.ext, "locate ";x;" ";y;" ";width;" ";height"
LOCATE IN MAINWINDOW
locate x, y
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)
Copyright (C) 2003 Shoptalk Systems
Liberty BASIC - http://www.libertybasic.com/