MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Manuel d'utilisateur Page 416

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 500
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 415
10 Lay Out a Programmatic UI
10-84
Display the Standard Toolbar
Use the figure Toolbar property to display or hide the standard toolbar. Set Toolbar to
'figure' to display the standard toolbar. Set Toolbar to 'none' to hide it.
fh.Toolbar = 'figure'; % Display the standard toolbar
fh.Toolbar = 'none'; % Hide the standard toolbar
In these statements, fh is the handle of the figure.
The default ToolBar value is 'auto', which uses the MenuBar property value.
Modify the Standard Toolbar
Once you have the handle of the standard toolbar, you can add tools, delete tools, and
change the order of the tools.
Add a tool the same way you would add it to a custom toolbar. This code gets the handle
of the standard toolbar and adds a toggle tool to it.
tbh = findall(fh,'Type','uitoolbar');
tth = uitoggletool(tbh,'CData',rand(20,20,3),...
'Separator','on',...
'HandleVisibility','off');
To remove a tool from the standard toolbar, determine the handle of the tool to be
removed, and then use the delete function to remove it. The following code deletes the
toggle tool that was added to the standard toolbar above.
delete(tth)
If necessary, you can use the findall function to determine the handles of the tools on
the standard toolbar.
Vue de la page 415
1 2 ... 411 412 413 414 415 416 417 418 419 420 421 ... 499 500

Commentaires sur ces manuels

Pas de commentaire