MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE User's Guide Page 453

  • Download
  • Add to my manuals
  • Print
  • Page
    / 759
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 452
A GUI to Set Simulink
®
Model Parameters (GUIDE)
function CloseB utto n_Callback(hObject, eventdata, handles)
% Close the GUI and any plot window that is open
if isfield(h andl es,'PlotFigure') && ...
ishandle(handles.PlotFigure),
close(handles.PlotFigure);
end
close(handles.F14ControllerEditor);
TheListBoxCallbackandCreateFunction
This GUI does not use the list box callback because the a ctions performed on
list box items are carried out by push buttons (Simulate and store results,
Remove,andPlot). GUIDE autom atically inserts a callback stub w hen yo u
add the list box and automatically sets the
Callback property to execute this
subfunction whenever the callback is triggered (which happens when users
select an item in th e list box).
In this example, there is no need for the list box callback to execute. You
candeleteitfromtheGUIcodefileandatthesametimealsodeletethe
Callback property string in the Property Inspector so that the software does
not attempt to execute the callback.
For more information on how to trigger the list box callback, see the
description of list box.
10-79
Page view 452
1 2 ... 448 449 450 451 452 453 454 455 456 457 458 ... 758 759

Comments to this Manuals

No comments