Produces a modal dialog box to obtain a response from the user.
Options
DIALOG = string token |
Type of dialog box (checkbox , pushbutton , radiobutton , text , integer , real , variable , query , message ); no default, must be specified |
---|---|
TITLE = text |
Title for the dialog box; default * i.e. none |
PREAMBLE = text |
Informative text that appears above any controls on the dialog; default * i.e. none |
LABEL = text |
Label for the data entry field; default * i.e. none |
RESPONSE = identifier |
Structure to store the response |
STATUS = scalar |
Stores the exit status as 1 for OK, 2 for cancel, 3 for no, or 4 for yes |
DEFAULT = identifier |
Default setting or settings to appear in the menu; default * i.e. none |
LIST = string token |
Whether an interger, real or variable entry field can contain a list of settings (yes , no ); default no |
HELP = texts |
Help on the menu, to be displayed in a pop-up window; default * i.e. none |
ICON = string token |
Type of icon to display in the dialog box (information , warning , error , query ); default * i.e. none |
TIMEOUT = scalar |
Permits the dialog to continue and return a default value after a specified period (in seconds); default * i.e. no timeout |
MINIMUM = scalar |
Minimum value for numerical input fields; default * i.e. none |
MAXIMUM = scalar |
Minimum value for numerical input fields; default * i.e. none |
Parameters
BOXLABEL = texts |
Label for each checkbox or radio button |
---|---|
BOXRESPONSE = scalars |
Indicates the selection status of each checkbox or radio button |
Description
QDIALOG
displays dialog box to obtain a response from the user. The dialog is modal i.e. the Genstat server pauses until an exit button(e.g. OK or Cancel) is pressed on the dialog.
The TITLE
option supplies a line of text to appear in the title bar of the dialog box, and the PREAMBLE
specified a text of general description to appear at the top of the box. You can use the HELP
option to supply additional information, which will be displayed in a pop-up window if the user clicks on a Help button. The ICON
option can specify one of the standard windows icons to appear in advance of the preamble. The DEFAULT
option can specify a default response to be shown when the dialog appears. The TIMEOUT
option can specify a time in seconds, after which the dialog will close automatically, and return the default.
The DIALOG
option specifies the type of dialog box, with the following settings.
checkbox |
allows the user to make a multiple-choice selection from a set of values. The BOXLABEL parameter specifies textual descriptions for each checkbox. The results selected for the boxes are saved in a list of scalars supplied by the BOXRESPONSE parameter; each scalar is set to 0 or 1 (false or true) according to whether or not the corresponding box is checked. The DEFAULT option can be set to a scalar or variate containing an index number or numbers defining the check boxes to be checked when the menu first appears. The STATUS option returns the value 1 (for OK) or 2 (for Cancel) depending on how the user exits from the menu. |
---|---|
radiobutton |
is similar to the checkbox dialog but only one choice is permitted. So, if a different choice is selected, the original is automatically cleared. The options and parameters are used in the same way as the checkbox dialog, with two small changes. The DEFAULT option must be set, and the user’s choice can be saved (in a scalar) by RESPONSE option, as an alternative to the BOXRESPONSE parameter. The RESPONSE scalar stores the number of the selected button, or zero if the dialog is cancelled. |
pushbutton |
works in the same way as a radio button dialog. However, it differs in appearance, as the strings specified in BOXLABEL are displayed on push-buttons. If set, the DEFAULT option specifies the button that is initially selected, and the value that is returned if the user presses the return or space keys. |
text , integer and real |
each contain a field into which a string or number can be typed, as appropriate. The LABEL option can supply a description or prompt for the input field. The input is saved by the RESPONSE option in a text or scalar (or variate if option LIST=yes ) as appropriate . The STATUS option returns the value 1 (for OK) or 2 (for Cancel). The MINIMUM and MAXIMUM options can be used to supply constraints for numerical responses. |
variable |
contains a field into which identifiers can be typed. The LIST option indicates whether there should be only one identifier, or whether there can be several separated by commas. The LABEL option can supply a description or prompt for the input field. The results are saved by the RESPONSE option, in a pointer. The STATUS option returns the value 1 (for OK) or 2 (for Cancel). |
query |
displays the preamble text and icon, followed by the question or query specified by the LABEL option. The dialog has buttons for no and yes. The STATUS option returns the value 1 (for OK), 3 (for no) or 4 (for yes). |
message |
displays the preamble text and icon, with an OK button. It exits when the OK button is pressed, with STATUS set to 1 (OK). |
Options: DIALOG
, TITLE
, PREAMBLE
, LABEL
, RESPONSE
, STATUS
, DEFAULT
, LIST
, HELP
, ICON
, TIMEOUT
, MINIMUM
, MAXIMUM
.
Parameters: BOXLABEL
, BOXRESPONSE
.
See also
Procedures: QFACTOR
, QLIST
. QUESTION
.
Commands for: Program control, Calculations and manipulation.