WINDOW
This page was last modified 20:39, 14 August 2021 by Mars2000you.

Contents

Effect

Defines a window in text mode.

Note: This instruction is not compatible with a Memory Disk created with CALL MEMINI.

Syntax

WINDOW #<WindowNumber>, <X1>,<Y1>,<X2>,<Y2>

Parameters

<WindowNumber> is a number between 1 and 9. It must always be preceded by #.

<X1> is coordinate X of the starting point of the window. It must be lower than the current width of the screen (what means between 0 and 39 or 79 in SCREEN 0 with WIDTH 40 or 80, 0 and 31 in SCREEN 1 with WIDTH 32).

However, if you want to get nice boxes with WBOX, you need to reserve the extreme positions for the drawing of the box. It implies to

  • use here only the numbers between 1 and 38 or 78 in SCREEN 0 with WIDTH 40 or 80, 1 and 31 in SCREEN 1 with WIDTH 32)
  • have a minimum of 3-point distance between the end points of a window and other windows

<Y1> is coordinate Y of the starting point of the window. It must be lower than the current height of the screen (what means between 0 and 23 when KEYOFF has been used).

However, if you want to get nice boxes with WBOX, you need to reserve the extreme positions for the drawing of the box. It implies to

  • use here only the numbers between 1 and 22 (21 for the last window that seems to be buggy) when KEYOFF has been used
  • have a minimum of 3-point distance between the end points of a window and other windows

<X2> is coordinate X of the end point of the window. Same limitations as for <X1>.

<Y2> is coordinate Y of the end point of the window. Same limitations as for <Y1>.

Example

10 SCREEN0:KEYOFF:WIDTH40
20 WINDOW#1,1,1,38,3
30 WBOX#1
40 WINDOW#2,1,6,10,9
50 WBOX#2
60 WINDOW#3,13,6,23,9
70 WBOX#3
80 WINDOW#4,26,6,38,9
90 WBOX#4
100 WINDOW#5,1,12,18,15
110 WBOX#5
120 WINDOW#6,21,12,38,15
130 WBOX#6
140 WINDOW#7,1,18,10,22
150 WBOX#7
160 WINDOW#8,13,18,23,22
170 WBOX#8
180 WINDOW#9,26,18,38,21
190 WBOX#9

Related to

CLS, FILL, KEY, LOCATE, ROLLD, ROLLL, ROLLR, ROLLU, SCREEN, WBOX, WIDTH, WINPUT, WPRINT, WRAPD, WRAPL, WRAPR, WRAPU

Compatibility

Delta BASIC