function tri f=figure(... 'MenuBar','none',... 'Position',[400 200 600 445]...);m_file=uimenu('Label','File');uimenu(m_file,'Label','New','Accelerator','N','Callback',{@new,f});endfunction new(hObject, eventdata, handle) d=dialog('Name','OPEN');end
I want to set the d's parent as f figure. I wrote
d=dialog('Parent',handle,'Name','OPEN');
instead of this:
d=dialog('Name','OPEN');
But i'm getting an error:
Error using figureWhile setting the 'Parent' property of Figure:Figure parent must be the root.Error in dialog (line 84)hDialog = figure('ButtonDownFcn' ,btndown , ...Error in den>new (line 10) d=dialog('Parent',handle,'Name','OPEN'); Error while evaluating Menu Callback
How can I fix this error and reach my aim?
Best Answer