
Selecting a GUI Template
6-11
Running the GUI displays the dialog box shown in the following figure:
The GUI returns the text string
Yes or No, depending on which button you
press. The GUI is blocking, which means that the current M-file stops
executing until the GUI restores execution. You can make a GUI blocking by
adding the following command to the opening function:
uiwait(handles.figure1);
To restore access to other MATLAB windows once a button is clicked, add the
following command to callbacks for both the
Yes and No push buttons:
uiresume(handles.figure1);
The GUI is also modal, which means that the user cannot interact with other
MATLAB windows until clicking one of the buttons. Select this template if you
want your GUI to return a string or to be modal.
See “Using a Modal Dialog to Confirm an Operation” on page 10-47 for an
example of using this template with another GUI. See the figure
WindowStyle
property for more information.
Commentaires sur ces manuels