Next: Field Description
Up: No Title
Previous: Messages to the user
Custom dialogs are composed of buttons, icons,
text fields, edit fields, check boxes, radio buttons
and scrolling menus
- Useful, because it is possible to perform checks on
what the user inputs (such as type or range checks)
- Also gives the designer more power to make the dialog
more expressive - hence greater control over the user
interaction
dialog(Title, Top, Left, Depth, Width,
DItems, Response)
- Title corresponds to the title displayed on the
dialog
- Top, Left, Depth and Width correspond to position
the dialog on the screen
- DItems correspond to a list of choices to be made by
the user - and are generally referred to as dialog field
format descriptors
- Response is a variable which indicates the selected
button
start :-
dialog('Destruct',60,20,70,160,
[button( 37,87,26,66,'Ok'),
button( 40,10,20,60,'Cancel'),
text(10,12,20,140,'Launch Missile')],
Response).
This will lead to a dialog with the title Destruct placed
at the part of the screen specified by the first 4 coordinates -
it also has 2 buttons and a text field above the buttons.
Figure 10: The Missle box
- If user presses Ok - call succeeds and
Response is bound to 1
- If user presses Cancel - call fails
- Normally - first two items should be buttons
(as these are handled in a special way)
Omer F Rana
Mon Mar 17 12:45:35 GMT 1997