Specifications
Laying Out GUIs – The Layout Editor
3-5
Activating the Figure
You can generate a functioning GUI by activating the figure you have designed
with the Layout Editor. Activate the figure by selecting the
Activate Figure
item in the
Tools menu or by clicking figure activator in the toolbar.
When you activate a figure, the following occurs:
•GUIDE first saves both the M-file and FIG-file. If you have not yet saved the
layout, GUIDE opens a
Save As dialog so you can select a name for the M-file
GUIDE is going to generate. GUIDE then saves the companion FIG-file with
the same name as the M-file, but with a
.fig extension.
•If an M-file with the same name exists, GUIDE prompts you to replace or
append to the existing code in the M-file.
Replace – writes over the existing file.
Append – inserts new callbacks for components added since the last save
and make changes to the code based on change made from the Application
Options dialog.
•MATLAB executes the M-file to display the GUI. The options specified in the
Application Options dialog are functional in the GUI. Callbacks that you
have not yet implemented, but that GUIDE inserted as stubs in the M-file,
simply return a message to the command line indicating they are not yet
implemented.
Note GUIDE automatically saves both the application M-file and the
FIG-file when you activate the GUI.