MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guide de l'utilisateur Page 675

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 759
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 674
GUI with Axes, Menu, and Toolbar
For a push button, the String property defines the label on the button.
Here it is defined as the string
Update.
Setting the
Callback property to @hUpdateButtonCallback defines the
name of the callback function that services the push button. That is,
clicking the push button triggers the execution of the named callback. This
callback function is defined later in the script.
See the Uicontrol Properties reference page for information about properties
of
uicontrol objects and their default values.
TheFileMenuandItsMenuItems
These statements define the File menu and the three items it contains.
hFileMenu = uimenu(... % File menu
'Parent',hMainFigure,...
'HandleVisibility','callback', ...
'Label','File');
hOpenMenuitem = uimenu(... % Open menu item
'Parent',hFileMenu,...
'Label','Open',...
'HandleVisibility','callback', ...
'Callback', @h Open MenuitemCallback);
hPrintMenuitem = uimenu(... % Print menu item
'Parent',hFileMenu,...
'Label','Print',...
'HandleVisibility','callback', ...
'Callback', @h Prin tMenuitemCallback);
hCloseMenuitem = uimenu(... % Close menu item
'Parent',hFileMenu,...
'Label','Close',...
'Separator','on',...
'HandleVisibility','callback', ...
'Callback', @h Clos eMenuitemCallback);
The uimenu function creates both the main menu, File,andtheitemsit
contains. For the main menu and each of its items, set the
Parent property
to the handle of the desired parent to create the menu hierarchy you want.
Here, setting the
Parent property of the File menu to hMainFi gure makes
15-11
Vue de la page 674
1 2 ... 670 671 672 673 674 675 676 677 678 679 680 ... 758 759

Commentaires sur ces manuels

Pas de commentaire