Creating Graphical User Interfaces |
|
Controlling Figure Window Behavior
When designing a GUI you need to consider how you want the figure window to behave. The appropriate behavior for a particular GUI depends on intended use. Consider the following examples:
- A GUI that implements tools for annotating graphs is usually designed to be available while the user performs other MATLAB tasks. Perhaps this tool operates on only one figure at a time so you need a new instance of this tool for each graph.
- A dialog that requires an answer to a question may need to block MATLAB execution until the user answers the question. However, the user may need to look at other MATLAB windows to obtain information needed to answer the question. The dialog is blocking.
- A dialog that warns users that the specified operation will delete files so you want to force the user to respond to the warning before performing any other action. In this case, the dialog is both blocking and modal.
The following techniques are useful for handling these GUI design issues:
| Event Processing During Callback Execution | | Using Modal Figure Windows | |