User`s guide
Use a Modal Dialog Box to C onfirm an Operation (GUIDE)
figure property WindowStyle determines whether it is modal or not. Typing
Ctrl+C changes a
'modal' WindowStyle to the default value, 'normal '.
Modal figu r es stack on top of all existing figure windows, making them
inaccessible as long as the top figure exists and remains modal. However,
any new figures created after a modal figu re is displayed (for example , plots
or other dialog boxes created by a modal GUI) stack on top of it and are
accessible ; th e y can be modal as well.
View and Run the Modal Dialog Box GUIs
If you are reading this document in the M ATLAB Help browser, you can
access the exam ple FIG-file and code f ile by clicking the fo llowing links. If you
are reading this on the Web or in PD F for m, go to the corresponding section in
the MATLAB Help Browser to use the links.
If you intend to modify the layout or code of this GUI example, first s ave
copies of its code files and FIG-files to your current folder (you need write
access to your current folder to do this). Follow these steps to copy the
example files to your current folder and then to open them:
1 Click here to copy the files to your current folder.
2 Enter guide modaldlg; guide co nfirm_close or Click here to open t he
GUI FIG-files in GUIDE.
3 Enter edit modaldlg; edit confirm_close or Click here to open the
GUIcodefilesintheEditor..
You can view the properties of any component by double-clicking it in the
Layout Editor to open the Property Inspector for it. You can modify either
the figure, the code, or both, and then save the GUI in your current folder
using File > Save as from GUIDE. This saves both files, allowing you to
rename them, if you choose.
To just inspect the GUI in GUIDE and run it, follow these steps instead:
1 ClickheretoaddtheexamplefilestotheMATLABpath(onlyforthe
current session).
10-99