Try to hide/show certain fields end with errors
显示 更早的评论
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))
>>
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Neuroimaging 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
