MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Specifikace Strana 37

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 216
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 36
Setting Properties for GUI Components
2-15
When you first add a component to a layout, GUIDE sets the value of Tag to a
default string such as
pushbutton1. If the component has a Callback property,
GUIDE also sets the value of
Callback to the string %automatic. The following
figure shows an example.
-
When you save or run the GUI, GUIDE generates an M-file that includes stubs
for the
Callback functions for each component that has one. GUIDE creates a
unique function name for each
Callback function in the M-file by prefixing the
value of the
Tag property to the string _Callback, for example,
pushbutton1_Callback. GUIDE also changes the value of the Callback
property to a string that is a calling sequence for the callback. For example, if
the name of the GUI M-file is
simple_gui, the new value of the Callback
property becomes
untitled('pushbutton1_Callback',gcbo,[],guidata(gcbo))
...
Zobrazit stránku 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 215 216

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

Žádné komentáře