MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Bedienungsanleitung Seite 151

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 330
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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.
Seitenansicht 150
1 2 ... 146 147 148 149 150 151 152 153 154 155 156 ... 329 330

Kommentare zu diesen Handbüchern

Keine Kommentare