MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Betriebsanweisung Seite 291

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 759
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 290
Customizing Callbacks in GUIDE
warnbeforesave. If possible, change the Tag property before saving the GUI
to cause GUIDE to autom atically create callback templates having names you
prefer. H owever, if you decide to change a
Tag property after saving the G U I,
GUIDE updates the following items according to the new
Tag,providedthat
all components have distinct tags:
The component’s callback functions in the GUI code file
The value of the component’s callback properties, which y ou can view in
the Property Inspector
References in the code file to the field of the
handles structure that
contains the component’s handle. See “handles Structure” on page 8-22 for
more information about the
handles structure.
To rename a particular callback function without changing the
Tag property,
In the Property Inspector, replace the name string in the callback property
with the new name . For example, if the value of the callback property for
apushbuttonin
mygui is
mygui('pushbutton1_Callback',hObject,ev entdata,guidata(hObject ))
the string pushbutton1_Callback isthenameofthecallbackfunction.
Changethenametothedesiredname,forexample,
closethegui.
As necessary, update instances of the callback function name in the code
file (for example, to
function closet hegu i in its function definition).
After y ou alter a callback signature, when ever you clic k its pencil-and-paper
icon
to go to the function definition in the GUI code file, GUIDE presents
a dialog box for you to confirm the changes you made.
8-23
Seitenansicht 290
1 2 ... 286 287 288 289 290 291 292 293 294 295 296 ... 758 759

Kommentare zu diesen Handbüchern

Keine Kommentare