BB___Window_Types

=Window Types= toc

Description
> Just BASIC provides four window types: Window; Graphics; Dialog; and Text.

Basic features of Window Types:
Can contain all controls. TAB key can be used to move focus from one control to the next. || Not intended to contain other controls. Most controls will not work properly if placed in this window type. || Best suited for getting information from a user. TAB key can be used to move focus from one control to the next. Can contain a default button activated by user hitting ENTER key. May display as "modal", meaning window must be closed before user can activate any other window. Will be closed by pressing ESC key (unless you prevent it in trapclose). Keyboard events in Graphicbox do not work in Dialog window. || Can not contain other controls. Useful for text display and editing. Always has a menu bar with a File and Edit menu. ||
 * **Window** ||  || Most used and most useful window type.
 * **Graphics** ||^  || Suitable for displaying graphics and graphical sprites.
 * **Dialog** ||^  || Can contain all controls, but not menus.
 * **Text** ||^  || Limited in functionality.

Syntax

 * 1) open "window title" for type as #handle
 * 2) open "window title" for type_suffix as #handle

Table of window features and attributes
graphics_fs_nsb graphics_nf_nsb dialog_nf_modal dialog_nf_fs text_nsb_ins
 * ~  ||   ||||||||||~ Style Suffixes ||   ||||||||||||||~ Features ||
 * = **Type** ||  ||= **_fs** ||= **_nf** ||= **_nsb** ||= **_ins** ||= **_modal** ||   ||~ Sizing frame ||   ||~ Menus ||   ||~ Scroll bars ||   ||~ Can contain other controls ||
 * ~ Window ||  ||   ||= X ||   ||   ||   ||   ||= Def/Opt ||   ||= Opt ||   ||= No ||   ||= Yes ||
 * ~ Graphics ||  ||= X ||= X ||= X ||   ||   ||   ||= Def/Opt ||   ||= Opt ||   ||= Def/Opt ||^   || Not intended to contain controls ||
 * ~ Dialog ||  ||= X ||= X ||   ||   ||= X ||   ||= No ||   ||= No ||   ||= No ||   ||= Yes ||
 * ~ Text ||  ||= X ||   ||= X ||= X ||   ||   ||= Def/Opt ||   ||= Def ||   ||= Def/Opt ||^   ||= No ||
 * Notes**
 * _fs ||  ||~ - ||   || window is sized to fill screen ||
 * _nf ||  ||~ - ||   || window has no frame and user cannot resize ||
 * _nsb ||  ||~ - ||   || window doesn't contain scroll bars ||
 * _ins ||  ||~ - ||   || window contains inset texteditor ||
 * _modal ||  ||~ - ||   || window must be closed before another window can gain focus ||
 * Def ||  ||~ - ||   || Default appearance at window opening ||
 * Opt ||  ||~ - ||   || Optional - can be disabled ||
 * No ||  ||~ - ||   || feature NOT available for this window type ||
 * Yes ||  ||~ - ||   || feature IS available for this window type ||
 * Combined Style Suffix Cases**
 * Combined Style Suffix Cases**

Example
code format="lb" ' Run this program to see an example of the four window types. nomainwin UpperLeftX=DisplayWidth/2-300 UpperLeftY=DisplayHeight/2-200 WindowWidth=300 WindowHeight=200 menu #1, "Stuff" open "Window" for window as #1
 * 1) 1 "trapclose [quit]"

UpperLeftX=DisplayWidth/2 UpperLeftY=DisplayHeight/2-200 WindowWidth=300 WindowHeight=200 menu #2, "Stuff" open "Graphic Window" for graphics as #2
 * 1) 2 "trapclose [quit]"

UpperLeftX=DisplayWidth/2-300 UpperLeftY=DisplayHeight/2 WindowWidth=300 WindowHeight=200 menu #3, "Stuff" open "Dialog Window" for dialog as #3
 * 1) 3 "trapclose [quit]"

UpperLeftX=DisplayWidth/2 UpperLeftY=DisplayHeight/2 WindowWidth=300 WindowHeight=200 menu #4, "Stuff" open "Text Window" for text as #4
 * 1) 4 "!trapclose [quit]"

wait

[quit] close #1 close #2 close #3 close #4 end code

Useful Functions
code format="lb" Place a useful function using this keyword here code