Try to hide/show certain fields end with errors
Show older comments
I created a GUI using guide that looks like the image I added here. 

I wanted to write a if-else block that test which radio button is selected and base on selction some input titles and their associated edit fields with be hidden ir visible respectivlty. I created a function using the the mouse right click menu when selecting the radio buttons group panel as I thught it should be related to what ever in that panel range. I added the whole fig and .m files as attachments.
Also after creating that fnc: function selectPanel_SelectionChangedFcn(hObject, eventdata, handles) and running the code:
(1) select different radio buttons in the pannel does not hide the fields it suppose to when the proper selection is made (1st button suppose to hide 3rd fields (fix text and ediable text)
(2) I am getting alot of errors that I was not getting befre creating that function
>> testHideAndShowByRadioBtn
Unrecognized function or variable 'figure1_CreateFcn'.
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in testHideAndShowByRadioBtn (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)testHideAndShowByRadioBtn('figure1_CreateFcn',hObject,eventdata,guidata(hObject))
Unrecognized function or variable 'selectPanel_CreateFcn'.
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in testHideAndShowByRadioBtn (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)testHideAndShowByRadioBtn('selectPanel_CreateFcn',hObject,eventdata,guidata(hObject))
>>
Accepted Answer
More Answers (0)
Categories
Find more on Neuroimaging 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!