MATLAB: Handles of a Button

getappdatagetapppdatahandlesseappdata

Does anybody know, which handles of a PushButton I can use for setappdata ?
except: userData

Best Answer

are you using uicontrols to make your gui?
if so this is an example.
h = figure,h1 = uicontrol('Style','pushbutton','Position',[20 20 100 60])
setappdata(h1,'example',10);disp(['button data :' num2str(getappdata(h1,'example'))])