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

  • 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 620
Examples: Program GUI C omponents
When a user selects Edit > Copy > to file,noCopy callback is needed to
perform the action. Only the
Callback callback as sociated with the to file
item is required.
Suppose, however, that only certain objects can be copied to a file. You can
use the Copy item
Callback callback to enable or disable the to file item,
depending on the type of object selected.
The follow i ng code disables the to file item by setting its
Enable property
off. The menu item would then appear dimmed.
set(tofilehandle,'Enable','off')
Setting Enab le to on, would then enable the menu item.
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. However, if a uimenu has one or more child uimenus, 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.
12-35
Vue de la page 620
1 2 ... 616 617 618 619 620 621 622 623 624 625 626 ... 758 759

Commentaires sur ces manuels

Pas de commentaire