A Dialog..EndDlog block is used to display a dialog box that can be used for input, output, or both. There are several commands that can be used inside Dialog..EndDlog to determine its content:
- At most one Title instruction (to add a title).
- Text (to add a line of text).
- Request (to add a text entry box).
- DropDown (to add a drop-down menu).
Except for the Title instruction, you can mix and match any number of these (as many as will fit on the screen), and their order will determine the order they are displayed. Finally, two "buttons" labeled Enter=OK and ESC=CANCEL will be displayed at the bottom of the dialog box.
Here is a typical dialog box to input a variable name:
:Dialog : Title "Load file" : Request "File name", name : Text "(include folder name if not ""main"")" :EndDlog
The system variable "ok" will detect if Enter or ESC was used to exit the dialog: it will have a value of 1 if Enter was used, and 0 for ESC.
This is particularly important when you're looking for input. If ESC is used, then the variables used in Request or DropDown will not be changed from what they were before (if they were undefined, they will remain undefined). It's probably a good idea to detect that sort of thing.
230 - Dimension happens when the dialog would be too wide or too tall to fit on the screen.
730 - Missing start or end of block syntax happens when the Dialog is missing its EndDlog, or vice versa.