Futurebasic/Language/Reference/def titlerect

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Syntax[edit | edit source]

DEF TITLERECT

Description[edit | edit source]

This statement draws and titles a rectangle in the current output window, as shown in the figure below. This statement is useful for creating title rectangles around button groupings (especially with radio and checkbox buttons). The titlePosition% parameter specifies the title's horizontal offset (in pixels) from the left side of the rectangle. The rectangle is given by the 8-byte structure contained in the variable rect or pointed to by rectAddr&. The rectangle is drawn using the current pen pattern and pen size. The title is drawn using the current font settings. In general, you will want to set the text copy mode to _srcCopy in order to erase the part of the rectangle where the text appears. Unless you're using the "FB Lite" runtime, the titled rectangle is not automatically refreshed. Your program should explicitly re-draw it (call DEF TITLERECT again) when you receive an update event for the window.

FB Lite behavior:

When you use the "FB Lite" runtime, DEF TITLERECT switches to the Graphics Window before executing.

See Also[edit | edit source]

TEXT; PEN; BUTTON statement; DEF BOX