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

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 330
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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.
Vue de la page 150
1 2 ... 146 147 148 149 150 151 152 153 154 155 156 ... 329 330

Commentaires sur ces manuels

Pas de commentaire