MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guía de usuario Pagina 328

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 759
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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
Vista de pagina 327
1 2 ... 323 324 325 326 327 328 329 330 331 332 333 ... 758 759

Comentarios a estos manuales

Sin comentarios