User`s guide
9 Managing and Sh aring Application Data in GUIDE
You can view the properties of any component by double-clicking it in the
Layout Editor to open the Property Inspector for it. You can modify either the
figure, the code, or both. Then you can save the G UI in your current folder
using File > Save As from G U ID E. This saves both the G U I and its code f ile.
If you save one of the GUIs in this way, you need to save the other one as well.
IfyoujustwanttoruntheGUIorinspectitinGUIDE,followthesesteps:
1 ClickheretoaddtheexamplefilestotheMATLABpath(onlyforthe
current session).
2 Clickheretorunthechangeme_main GUI.
3 Click here to display the GUI in the GUIDE Layout Editor (read-only).
4 ClickheretodisplaytheGUIcodefileintheMATLABEditor(read-only).
Note Do n o t save GUI files to the examples folder where you fo und them,
or you will overwrite the original files. If you want to s ave the G UI files,
use File > Save As from GU ID E, which saves both the GUI FIG-file and
the GUI code file.
Do not change the file name of either GUI when using Save As .Becausethe
changeme_main code calls the changeme_dial og function, modifying that file
name would m ake the GUI inoperable.
Invoking the Text Change Dialog Box
When the user clicks the Change Me button, the Text Change dialog
box opens. Invoke this dialog box by calling i ts main function with a
property/value pair:
• Name:
'changeme_main' (the ma in GUI’s name)
• Value: the main GUI’s figure handle
function buttonChangeMe_C allback(hObject,eventdata, handles)
% Call the dialog to change button name giving this figure's handle
9-24