Creating Graphical User Interfaces |
 |
Controlling GUI Figure Window Behavior
When designing a GUI you need to consider how you want the figure window to behave once it is displayed. The appropriate behavior for a particular GUI figure 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 requiring 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.
- A dialog 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 figure is both blocking and modal.
The following three techniques are useful for handling these GUI design issues:
| Event Processing During Callback Execution | | Using Modal Figure Windows |  |