Deleting CreateFcn from GUI .m file
Show older comments
I have finished creating GUI and since I have a lot of objects my .m-file is quite long, mainly because there is a lot of
function name_CreateFcn(hObject, eventdata, handles)
I thought I can delete these CreaterFcn since I dont use then, only Callbacks, but when I deleted them and run the program I am receiving an error for each object:
Error using feval Undefined function 'name_CreateFcn' for input arguments of type 'matlab.ui.control.UIControl'.
Error in gui_mainfcn (line 95) feval(varargin{:});
Error in GUI (line 16) gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)GUI('name_CreateFcn',hObject,eventdata,guidata(hObject))
Is it possible then to delete these CreateFcn without receiving error, or they must remain in the code?
Accepted Answer
More Answers (0)
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!