Save a GUI

To save a GUI in GUIDE, use any of the following methods:

  • On the Layout Editor toolbar, click Save or Run .

  • On the Layout Editor menu bar, select the FileSave or Save as options

    Note:   GUIDE GUIs cannot run correctly from a private folder.

Create a Backward Compatible GUIDE Fig-File

GUI FIG-files that are created or modified with MATLAB® 7.0 or a later MATLAB version, are not automatically compatible with Version 6.5 and earlier versions.

To make a FIG-file (which is a kind of MAT-file) backward compatible:

  1. From the Layout editor, select File > Preferences.

  2. Select MATLAB > General > MAT-Files.

  3. Select MATLAB Version 5 or later (save -v6)

Because Button groups, panels and tables were introduced in MATLAB 7, you should not use them in GUIs that you expect to run in earlier MATLAB versions.

    Note   The -v6 option is obsolete and will be removed in a future version of MATLAB

Append New Callbacks to an Existing GUIDE Code File

If you save a GUIDE gui to an existing file, GUIDE displays a dialog box that asks you if you want to replace the existing FIG-file. If you click Yes, GUIDE displays a dialog that asks if you want to replace the existing code file or append to it. The most common choice is Replace.

If you choose Append, GUIDE adds callbacks to the existing code file for components in the current layout that are not present within it. Before you append the new components, ensure that their Tag properties do not duplicate Tag values that appear in callback function names in the existing code file.

Was this topic helpful?