user interface - GUI uiwait/uiresume fig Matlab -
i have matlab gui takes input in p array
different functions different methods, question how can terminates uiwait
when input of p array
taken, such when function of input terminated successfully. i'm trying put uiresume
doesn't work on side.
my code (main function):
function varargout = gui(varargin) if nargin == 0 fig = openfig(mfilename,'reuse'); handles = guihandles(fig); guidata(fig, handles); uiwait (fig); if nargout > 0 varargout{1} = fig; end elseif ischar(varargin{1}) try if (nargout) [varargout{1:nargout}] = feval(varargin{:}); else feval(varargin{:}); end catch end end
i don't code supposed do.
in case: uiresume
has placed somewhere in callback of gui you're opening, since you're above code stops running in uiwait
line.
so, might have "ok"-button on gui callback à la:
function ok_button_callback(object, evt, handles) fig = ancestor(object, 'figure'); uiresume(fig); end
Comments
Post a Comment