Specifications

Example: Using the Modal Dialog to Confirm an Operation
4-41
Note The following links execute MATLAB commands and are designed to
work within the MATLAB Help browser. If you are reading this online or in
PDF, you should go to the corresponding section in the MATLAB Help
Browser to use the links.
Click here to display the GUIs in the Layout Editor.
Click here to display the GUI M-files in the editor.
Setting Up the Close Confirmation Dialog
To set up the dialog, do the following:
1 Select New from the File menu in the GUIDE Layout Editor.
2 In the GUIDE Quick Start dialog, select the Modal Question Dialog
template and click
OK.
3 Right-click the static text, Do you want to create a question dialog?,
in the Layout Editor and select Property Inspector from the pop-up menu.
4 Scroll down to String in the Property Inspector and change the String
property to
Are you sure you want to close?
5 Select Save from the File menu and type modaldlg.fig in the File name
field.
The GUI should now appear as in the following figure.