Command Line


Use keywords to find the content you
are looking for with in the site.

Dialog Box's

A dialog box is a pop-up windows that contains a system menu and a variety of dialog box items. Dialog box's are created from with in a batch program using the DLGBOX command. The items are added to a dialog box using the DLGITEM command. Dialog box's may include any of the following items :-
    Push buttonGroup boxRectangle
    Radio buttonCombo boxFrame
    List boxEdit text
    Check boxStatic text
After a dialog box has been created and all the items have been added the DLGSHOW command is used to display the dialog box and activate it. Events generated by the items in the dialog box are handled by the procedures assigned to each item. Not all dialog items require procedures since many items do not generate any events, for example, Group box's, Edit text, Static text, Rectangles and Frames do not generate any events. Dialog box items that do generate events may also not require a procedure when the event generated by the item requires no action. Typically, this will not be the case and items that do generate events will have a procedure assigned to them.

Unlike the procedures assigned to items, which handle events generated by each item, a dialog box may also be assigned a procedure, which is called only once just before the dialog box is displayed. Typically, the procedure assigned to a dialog box is used to initialise any of the items contained in the dialog box.

There are a number of commands that may be used to manipulate items contained in a dialog box. In general, these commands will be used from with in the procedures assigned to the items in a dialog box that generate events. Once a dialog box is no longer needed the DLGEND command may be used to close the dialog box and cause the batch program to return control to the respective DLGSHOW command that was used to displayed the dialog box.

Essentially, dialog box's are written using a methodology which is commonly referred to as event-driven programming which differs from a typical batch program which uses a sequential programming methodology. Sequential programs have a distinct beginning, flow of control (ie. a logical sequence of events) and a distinct end, as follows :-

Sequential Methodology

Event-driven batch programs are controlled by the occurrence of events generated by the items contained in each dialog box and unlike the sequential methodology, these events may occur in any order. The following outlines the event-driven methodology :-

Event-driven Methodology

Dialog box's may be nested, that is, dialog box's may be created, displayed and manipulated from with in another dialog box. This includes using any of the special purpose built in dialog box's such as MSGBOX, EDITBOX, DISPBOX, OPENBOX and SAVEBOX.

WinOne® includes a Dialog Editor which simplifies the process of designing a dialog box. See the Dialog Editor documentation for more information about the Dialog Editor.

Copyright © 1995-2018 Lucien Cinc, All Rights Reserved
WinOne® is an Australian registered trademark

Go to the Australian Command Line Software web site.