MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Manuale Utente Pagina 151

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 330
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 150
Creating Toolbars
6-61
Creating Toolbars
GUIDE provides no tool to enable you do add a toolbar. However, you can add
a toolbar by adding code to the opening function.
See “Initialization Callbacks” on page 8-15 for information about the opening
function, and the
uitoolbar, uipushtool, and uitoggletool reference pages
for information and examples.
Add the following code to the GUI’s opening function to produce the toolbar
shown. The example creates a toolbar (
uitoolbar) and places a toggle tool
(
uitoggletool) on it.
ht = uitoolbar(hObject)
a(:,:,1) = rand(20);
a(:,:,2) = rand(20);
a(:,:,3) = rand(20);
htt = uitoggletool(ht,'CData',a,'TooltipString','Hello')
In the opening function, hObject is an input argument that holds the figure
handle. The
CData property enables you to display a truecolor image on the
toggle tool.
Vedere la pagina 150
1 2 ... 146 147 148 149 150 151 152 153 154 155 156 ... 329 330

Commenti su questo manuale

Nessun commento