MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guida Utente Pagina 581

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 759
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 580
Create Toolbars for Programmatic GUIs
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. The following
code retrieves the handle of the MATLAB standard toolbar and adds to the
toolbar a toggle tool similar to the one defined in “Toolbars” on page 11-89.
fh
isthehandleofthefigure.
tbh = findall(fh,'Type','uitoolbar ');
tth = uitoggletool(tbh,'CData', rand(20,20,3),...
'Separator','on',...
'HandleVisibility','off');
New toggle tool
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 stan da r d too l ba r above .
delete(tth)
If necessary, you can use the findall function to determine the handles of
the tools on the standard toolbar.
11-93
Vedere la pagina 580
1 2 ... 576 577 578 579 580 581 582 583 584 585 586 ... 758 759

Commenti su questo manuale

Nessun commento