5 GUIDE Preferences and Options
To ensure that the figure background matches the color of the components, select Use
system color scheme for background in the GUI Options dialog.
NoteThis option is available only if you first select the Generate FIG-file and
MATLAB file option.
Generate FIG-File Only
The Generate FIG-file only option enables you to open figures and UIs to perform
limited editing. These can be any figures and need not be UIs. UIs need not have been
generated using GUIDE. This mode provides limited editing capability and may be useful
for UIs generated in MATLAB Versions 5.3 and earlier. See the guide function for more
information.
GUIDE selects Generate FIG-file only as the default if you do one of the following:
- Start GUIDE from the command line by providing one or more figure objects as
arguments.
guide(f)
In this case, GUIDE selects Generate FIG-file only, even when a code file with a
corresponding name exists in the same folder.
- Start GUIDE from the command line and provide the name of a FIG-file for which no
code file with the same name exists in the same folder.
guide('myfig.fig')
- Use the GUIDE Open Existing GUI tab to open a FIG-file for which no code file
with the same name exists in the same folder.
When you save the figure or UI with Generate FIG-file only selected, GUIDE saves
only the FIG-file. You must update any corresponding code files yourself, as appropriate.
If you want GUIDE to manage the UI code file for you, change the selection to Generate
FIG-file and MATLAB file before saving the UI. If there is no corresponding code file in
the same location, GUIDE creates one. If a code file with the same name as the original
figure or UI exists in the same folder, GUIDE overwrites it. To prevent overwriting an
existing file, save the UI using Save As from the File menu. Select another file name for
the two files. GUIDE updates variable names in the new code file as appropriate.