MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Uživatelský manuál Strana 58

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 500
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 57
3 A Simple Programmatic UI
3-6
hpopup = uicontrol('Style','popupmenu',...
'String',{'Peaks','Membrane','Sinc'},...
'Position',[300,50,100,25]);
ha = axes('Units','Pixels','Position',[50,60,200,185]);
align([hsurf,hmesh,hcontour,htext,hpopup],'Center','None');
%Make the UI visible.
f.Visible = 'on';
end
6
Run your code by typing simple_gui2 at the command line. You can select a data
set in the pop-up menu and click the push buttons, but nothing happens. This
is because there is no callback code in the file to service the pop-up menu or the
buttons.
Code the Simple Programmatic UI Behavior
Program the Pop-Up Menu
The pop-up menu enables users to select the data to plot. When a user selects one
of the three data sets in the pop-up menu, MATLAB software sets the pop-up menu
Zobrazit stránku 57
1 2 ... 53 54 55 56 57 58 59 60 61 62 63 ... 499 500

Komentáře k této Příručce

Žádné komentáře