MAINWIN

From Liberty BASIC Family
Jump to navigation Jump to search
Supported in Just BASIC Supported in Liberty BASIC Not supported in Liberty BASIC 5 Not supported in Run BASIC

Description

Sets the width (number of characters) and height (number of lines) of the window for non-GUI programs.

Syntax

  1. mainwin Columns Rows
  2. mainwin Columns

Hints

The MAINWIN command modifies the text window size for all non-GUI programs. The values are stored in the editors INI file, lines 13 and 14, and can also be modified from the "Setup" > "Preferences" menu. The default values for the text window are 80 columns and 24 rows.
Because MAINWIN affects other BASIC programs, avoid changing the values without a good reason.
MAINWIN will have an effect even if the NOMAINWIN command is issued and no text window is displayed at all.
The MAINWIN command only accepts numeric literals.
If both the columns and rows count is 0, the main window is opened maximized.
If the code contains several MAINWIN commands, only the last one will have an effect.

Example

' make the mainwin 80 columns wide and 32 rows high
    MAINWIN 80 32

    print "Hello, World."
    end

Useful Procedures

' Place a useful function or sub using this keyword here