Window (procedure) (Crt unit)

Language:
Русский
English

 Window (procedure)     (Crt unit)


Defines a text window on the screen.

Declaration

 procedure Window(X1, Y1, X2, Y2: Byte);

Target

Real, Protected

Remarks

X1 and Y1 are the coordinates of the upper left corner of the window, and X2 and Y2 are the coordinates of the lower right corner. The upper left corner of the screen corresponds to (1, 1). The minimum size of a text window is one column by one line. If the coordinates are invalid in any way, the call to Window is ignored.

The default window is (1, 1, 80, 25) in 25-line mode, and (1, 1, 80, 43) in 43-line mode, corresponding to the entire screen.

All screen coordinates (except the window coordinates themselves) are relative to the current window. For instance, GotoXY(1, 1) will always position the cursor in the upper left corner of the current window.

Many Crt procedures and functions are window-relative, including ClrEol, ClrScr, DelLine, GotoXY, InsLine, WhereX, WhereY, Read, Readln, Write, Writeln.

WindMin and WindMax store the current window definition. A call to the Window procedure always moves the cursor to (1, 1).

See Also

Sample Code

Тэги: Window
| G+
Код для вставки: :: :: :: ::
Поделиться: // //