Liberty BASIC Help Online

Window Types
 
Liberty BASIC provides different kinds of window types. Controls can be added to these windows as needed (see help section Controls - Menus, Buttons, Etc.).  Here are the kinds of windows and the commands associated with them:
 
The way to specify what kind of window to open is as follows:
 
    open "Window Title" for type as #handle
 
  where type would be one of the descriptors below.
 
Style suffixes for window types (not all suffixes are supported for each window type):
 
_fswindow is sized to fill the screen
_nfwindow has no frame and cannot be resized by user
_nsbwindow doesn't contain scroll bars
_inscontains inset texteditor
_popupwindow contains no titlebar or sizing frame
_modalwindow must be closed before another window can gain focus
 
Liberty BASIC Window Types
There are four types of windows available.These four types include style variations as specified above. The styles of these windows can be changed if the STYLEBITS command is issued before the command to open the window.
 
Here are the descriptions of the four window types.
 
Window
Windows of type "window" are the most used and useful windows used by Liberty BASIC programmers.  They can contain any of the controls.  They can have a sizing frame, or omit it.  They can have a titlebar, or they can appear with no titlebar. They can include a menu, but they do not have to have a menu. It is also possible for the user to hit the TAB key to move focus from one control to the next in a window of type "window."
 
Graphics
Windows of type "graphics" are especially suited to displaying graphics and graphical sprites.  They are not intended to contain controls, and some controls do not work properly when placed in a graphics window.  A sizing frame and scrollbars are optional in a graphics window.
 
Dialog
Windows of type "dialog" are similar to windows of type "window" in that they can contain all of the other controls except menus.  Menus cannot be placed on a dialog window.  Dialog windows allow the user to hit the TAB key to move focus from one control to the next.  A dialog can have a default button that is activated when the user hits the ENTER key.  For this reason, texteditors do not work well in dialog windows, because hitting ENTER is trapped by the window and the user cannot add a carriage return to text in a texteditor.  Dialog windows are best suited for getting information from a user, although it is possible to have applications that are dialog-based. Dialog windows may display as "modal."  This means that they receive the input focus for the program until they are closed.  Other program windows cannot be accessed by a user while a modal dialog is displayed.
 
Text
Windows of type "text" are quite limited in their functionality.  They are not meant to contain other controls.  They are useful for displaying text to a user, or for allowing a user to write and edit text. Text windows always have a menubar that contains a ready-made File Menu and a ready-made Edit Menu.
 
 
Window types:
 
graphicsopen a graphics window
graphics_fsopen a graphics window full screen (size of the screen)
graphics_nsbopen a graphics window w/no scroll bars
graphics_fs_nsbopen a graphics window full screen, w/no scroll bars
graphics_nf_nsbopen a graphics window with no sizing frame or scroll bars
 
Graphics Commands
 
 
textopen a text window
text_fsopen a text window full screen
text_nsbopen a text window w/no scroll bars
text_nsb_insopen a text window w/no scroll bars, with inset editor
 
Text Commands
 
 
windowopen a basic window type
window_nfopen a basic window type without a sizing frame
window_popupopen a window without a titlebar
 
Window and Dialog Commands
 
 
dialogopen a dialog box
dialog_modalopen a modal dialog box
dialog_nfopen a dialog box without a frame
dialog_nf_modalopen a modal dialog box without a frame
dialog_fsopen a dialog box the size of the screen
dialog_nf_fsopen a dialog box without a frame the size of the screen
dialog_popupopen a dialog box without a titlebar
 
Window and Dialog Commands


Copyright (C) 2003 Shoptalk Systems
Liberty BASIC - http://www.libertybasic.com/