MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Podręcznik Użytkownika Strona 682

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 759
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 681
15 Examples of GUIs Created Programmatically
delete(hMainFigure);
end
The hCloseMenuite mCal lback function calls the questdlg function to create
and open the ques tion dialog box show n in the following figure.
If the user clicks the No button, the callback returns. If the user clicks the
Yes button, the callback deletes the GUI.
See “Helper Function: Plot the Plot Types” on page 15-18 for a description of
the
localUpdatePlot function.
Helper Function: Plot the Plot Types
The example defines the localUpdatePlot function at the same level as the
callback functions. Because of this,
localUpdatePlot has access to the same
data and component handles.
function localU pdat ePlot
% Helper function for plott ing the selected pl ot type
mPlotTypes{get(hPlotsPopupmenu, 'Value'), 2}(hPlotAxes );
end
The localUpdatePlot function uses the pop-up menu Value property to
identify the selected menu item from the first column of the
mPlotTypes
5-by-2 cell array, then calls the corresponding anonymous function from
column two of the cell array to create the plot in the axes.
15-18
Przeglądanie stron 681
1 2 ... 677 678 679 680 681 682 683 684 685 686 687 ... 758 759

Komentarze do niniejszej Instrukcji

Brak uwag