Hi,
I'd like my radiobutton to switch back to the last used value if the user of the gui answers 'no' to the dialogbox.
Here is the button/function (I have three buttons/cases in the actual code)
%buttons
FileTypeBG = uibuttongroup(ParametersFig, 'Visible','on',... 'Title','Fit Type',... 'Parent',ParametersFig,'units','normalized','outerposition',[.22 .33 .10 .12],... 'BackgroundColor',.8*[1 1 1],... 'SelectionChangedFcn',@FileType);Filenames_B = uicontrol(FileTypeBG,'Style',... 'radiobutton',... 'String','Filenames',... 'Position',[10 3 100 30],... 'BackgroundColor',.8*[1 1 1],... 'HandleVisibility','on'); end function FileType(src, event) switch src.String case 'Filenames' FileMethod.Tag = Filenames choice = questdlg('Are you sure?',... 'Switching to Process Data via Filenames Confirmation',... 'Yes','No','No'); switch choice case 'Yes' Update1 otherwise ??????????????? end endend
Best Answer