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

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 330
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 63
3 Creating a GUI Programmatically
3-16
each component’s Callback property to specify the name of the callback with
which it is associated.
1 To the uicontrol statement that defines the Surf push button, add the
property/value pair
'Callback',{@surfbutton_Callback}
so that the statement looks like this:
hsurf = uicontrol('Style','pushbutton','String','Surf',...
'Position',[315,220,70,25],...
'Callback',{@surfbutton_Callback});
Callback
is the name of the property. surfbutton_Callback is the name of
the callback that services the
Surf push button.
2 Similarly, to the uicontrol statement that defines the Mesh push button,
add the property/value pair
'Callback',{@meshbutton_Callback}
3 To the uicontrol statement that defines the Contour push button, add the
property/value pair
'Callback',{@contourbutton_Callback}
4 To the uicontrol statement that defines the pop-up menu, add the
property/value pair
'Callback',{@popup_menu_Callback}
The next topic, “Running the Final GUI” on page 3-17, shows the final M-file
and runs the GUI.
Zobrazit stránku 63
1 2 ... 59 60 61 62 63 64 65 66 67 68 69 ... 329 330

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

Žádné komentáře