User`s guide

GUI with Axes, Menu, and Toolbar
The hPrintMenuitemCallback function calls the printdlg function. This
function opens the standard system dial o g box for printing the current figure.
Your print dialog box might look different than the one shown here.
Close M
enu Item Callback
The hCloseMenuitemCallback function services the Close menu item. It
executes when the GUI user selects Close from the File menu.
funct
ion hCloseMenu item Callback(hObject, e vent data)
%Cal
lback function run when the C lose menu item is selected
sele
ction = ...
ques
tdlg(['Close ' get(hMainFigure,'Name') '?'],...
['Cl
ose ' get(hMainFigure,'Name') '...'],...
'Ye
s','No','Yes');
if s
trcmp(selection,'No')
ret
urn;
en
d
15-17