MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Uživatelský manuál Strana 151

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 330
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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.
Zobrazit stránku 150
1 2 ... 146 147 148 149 150 151 152 153 154 155 156 ... 329 330

Komentáře k této Příručce

Žádné komentáře