MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Podręcznik Użytkownika Strona 286

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 759
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 285
8 Programming a GUIDE GUI
@(hObject,eventdata)mygui('pushbutton1_Callback',hObject,eventdata,guidata(hObject))
The syntax @(hObject,eventdata) indicates that this is a n anonymous
function. The signature enables MATLAB to execute the right callback when
the user clicks this push button by providing the following information.
The name of the file in which the callback function resides (
'mygui')
Thenameofthecallbackfunctionwithinthefile(
'pushbutton1_Callback')
The argument list to pass to the callback function:
1 hObject The handle of the component issuing the callback (a push
button, in this case)
2 eventdat a A structure containing event data generated by the
component (for push buttons and o ther components that generate no
event d ata, this argument contains an empty matrix)
3 guidata( hObject) The “handles Structure” on page 8-22 for the GUI,
used to communicate component handles between callbacks
The fo llowing figure illustrates how these elements relate to one another.
8-18
Przeglądanie stron 285
1 2 ... 281 282 283 284 285 286 287 288 289 290 291 ... 758 759

Komentarze do niniejszej Instrukcji

Brak uwag