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

  • 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 327
8 Programming a GUIDE GUI
Mouse Gestures and Menu Callback Behavior. Callback s for leaf me n u
items, such as for to file or to clipboard in the previous example, actuate
when you release the mouse over them. Callbacks for main menus (like Edit)
and non-leaf submenus (like Copy) actuate when you select them by sliding
the mouse pointer into them after they display. Even w hen it has no menu
items, a main menu callback actuates as soon as you select the menu. When a
submenu contains no items, its callback actuates upon releasing the mouse
over it. H ow ever, if a submenu has one or more child menu items, its callback
actuates as soon as you select it. The mouse button does not have to be d ow n
to trigger the callback of a m enu item that has children.
Opening a Dialog Box from a Menu Callback
The Callback callback for the to file menu item could contain code such as
the following to display the standard dialog box for saving files.
[file,path] = uiputfile('animinit. m','Save file name' );
'Save file name'
is the d ialog box title. In the dialog box, the filename field
is set to
animinit.m, and the filter set to MAT LAB code files (*.m). For more
information, see the
uiputfile reference page.
8-60
Vue de la page 327
1 2 ... 323 324 325 326 327 328 329 330 331 332 333 ... 758 759

Commentaires sur ces manuels

Pas de commentaire