< Futurebasic < Language < Reference

CLS

CLS

Syntax

CLS [LINE | PAGE]

Description

CLS resets the current window's clipping region to encompass the entire window, clears the entire contents of the window to the background pattern and color (usually white), and resets the pen to a position near the upper-left corner (0, 0) of the window. If the window contains controls or edit fields created by FB statements, and the window's "autoClip" attribute is turned on, then CLS will exclude those areas from the clipping region, and will not erase them.

CLS LINE clears a rectangle as high as the current font, from the current pen position to the right side of the window. This is handy for clearing text from the current line only. The pen position is not affected.

CLS PAGE clears the text from the pen position to the right side of the window (as CLS LINE does), then clears the entire window below the pen position. The pen position is not affected.

"FB Lite" behavior:
When you use the "FB Lite" runtime, CLS switches to the Text Window before executing; therefore it only clears text. If you want to clear the Graphics Window, first switch to the Graphics Window (using a statement like <a href="pen.html">PEN</a>), then call the Toolbox procedure <a href="http://developer.apple.com/documentation/mac/QuickDraw/QuickDraw-100.html">ERASERECT</a>.

See Also

"_autoClip" attribute of the WINDOW statement

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.