Cancel and OK are hardcoded in inputdlg
OKHandle=uicontrol(InputFig , ...
BtnInfo , ...
'Position' ,[ FigWidth-2*BtnWidth-2*DefOffset DefOffset BtnWidth BtnHeight ] , ...
'KeyPressFcn',@doControlKeyPress , ...
'String' ,'OK' , ...
'Callback' ,@doCallback , ...
'Tag' ,'OK' , ...
'UserData' ,'OK' ...
);
setdefaultbutton(InputFig, OKHandle);
CancelHandle=uicontrol(InputFig , ...
BtnInfo , ...
'Position' ,[ FigWidth-BtnWidth-DefOffset DefOffset BtnWidth BtnHeight ] , ...
'KeyPressFcn',@doControlKeyPress , ...
'String' ,xlate('Cancel', '-s') , ...
'Callback' ,@doCallback , ...
'Tag' ,'Cancel' , ...
'UserData' ,'Cancel' ...
);
Above is code from inputdlg.m.
If you change in inputdlg.m, it will affect all inputdlg usages.
Check other similar functions if they are useful.
dialog, errordlg, helpdlg, listdlg, msgbox,
questdlg, textwrap, uiwait, warndlg
Best Answer