MATLAB Creating Graphical User Interfaces

(ff) #1
Difference GUIDE App Designer More
Information
Writing
Callbacks

Required callback input
arguments are handles,
hObject, and eventdata.

For example,
myCallback(hObject,ev
endata,handles)

Required callback input
arguments are app and
event.

For example,
myCallback(app,event)

“Write
Callbacks in
App
Designer” on
page 17-18

Sharing Data To store and share data
between callbacks and
functions, use the
UserData property, the
handles structure, or the
guidata, setappdata, or
getappdata functions.

For example,
handles.currSelection
= selection;
guidata(hObject,handl
es);

To store and share data
between callbacks and
functions, use custom
properties to create
variables.
For example,
app.currSelection =
selection

“Share Data
Within App
Designer
Apps” on
page 17-29

See Also


Related Examples



  • “Create and Run a Simple App Using App Designer” on page 14-2

  • “Displaying Graphics in App Designer” on page 14-10

  • “Ways to Build Apps” on page 1-2


See Also
Free download pdf