User`s guide
10 Examples of GUIDE GUIs
Use a Modal Dialog Box to Con firm an Operation (GUIDE)
In this section...
“About the Modal Dialog Example” on page 10-98
“View and Run the Modal Dialog Box GUIs” on page 10-99
“Set Up the Close Confirmation Dialog” on page 10-100
“Set Up the GUI with the Close Button” on page 10-101
“Run the Close-Confirmation G UI” on page 10-102
“How the Close-Confirmation GUIs Work” on page 10-103
About the Modal Dialog Example
This example illustrate s how to use the modal dialog GUI together with
another GUI that has a Close button. Clicking the Close button displays
the modal dialog box, which asks users to confirm that they really want to
proceed w ith the close operation.
The following figure illustrates the dialog box positioned over the GUI
application, awaiting the user’s response.
A modal dialog box blocks a user’s access to the Command Window or o ther
MATLAB window s until the user closes it o r types Ctrl+C (w hich turns it into
a nonmodal dialog box). You can make any GUI m odal, but normally GUIs
are nonmodal in order to let users change window focus while they work. The
10-98