WIDTH edit

Syntax edit

WIDTH [LPRINT][=]{_noTextWrap|_textWrap|numChars}

Description edit

This statement affects how (and whether) text printed by subsequent PRINT or LPRINT statements will "wrap."If you specify the LPRINT keyword, the WIDTH statement applies only to statements sent to the printer. If you omit the LPRINT keyword, the WIDTH statement applies only to subsequent PRINT statementsdestined for the screen. WIDTH (without LPRINT) applies to all existing and subsequently-created windows.

Notes edit

While "wrapping" is enabled, any subsequently printed text whose location exceeds a certain limit on the current line will automatically "wrap around" and continue at the beginning of the next line. Wrapping does not necessarily occur on word boundaries.

If you specify _noTextWrap, wrapping is disabled. Text continues on the current line until the pen is explicitly moved to the next line (this usually happens automatically after the last item in the PRINT or LPRINT statement has been printed). Note that if the window or the printer page is not wide enough to display all of the items in the print list, some of the items will be lost. The advantage of using _noTextWrap is that it greatly increases printing speed.

If you specify _textWrap, wrapping occurs at the right edge of the window or the printer page. This is the default condition in effect before the first execution of WIDTH.

If you specify numChars (which must be a number in the range 1 through 255), wrapping occurs either at the right edge of the window (or the printer page), or after numChars characters have been printed on the current line, whichever occurs first. Note that if you're using a proportional font, the horizontal pixel location where wrapping occurs may be different on different lines.

FB Lite behavior: When you use the "FB Lite" runtime, the WIDTH statement is ignored; essentially, WIDTH [LPRINT] _textWrap is always in effect. Also, previously-printed text in the Text Window will dynamically "re-wrap" as the user resizes the window. If you're not using the "FB Lite" runtime, you won't get the dynamic re-wrap effect; previously-printed text stays where it is, and may be obliterated if the user resizes the window.

See Also edit