Illogical and strange behavior of the Gui button group s
1 次查看(过去 30 天)
显示 更早的评论
Hello everybody.
I have got a quite big GUI just made. It was working perfectly till the moment I decided to add a new "edit text" items for more input data... At this moment all the "button-groups" stopped working. No exclusive selection was possibe and the code in the SelectionChangeFcn didn´t work...
Solution: Take out the radio buttons fron the buttongroups and put again inside and... it started working again! :-(
Somebody knows some logical explanation?
I´m using Matlab 2007b and I am not sure if it has got some restrccions for example with the "eventdata" extructure... I refer to the message in the eventdata information that says "reserved for a future version of Matlab".
So... here is one of the SelectionChangeFcn that I use.
*********************************
function uipanel17_SelectionChangeFcn(hObject, eventdata, handles)
% hObject handle to the selected object in uipanel17
% eventdata reserved - to be defined in a future version of MATLAB <<<====
% handles structure with handles and user data (see GUIDATA)
Tag_Fehler = get(hObject, 'Tag')
%NewValue = get(eventdata.NewValue,'Tag')
switch Tag_Fehler % Get Tag of selected object.
case 'togglebutton2_3F'
set(handles.text2,'String','S-C current, Ippk3 [A]')
case 'togglebutton3_2F'
set(handles.text2,'String','S-C current, Ippk2 [A]')
end
********************************
I am using the code this way becouse it is not possible using the way explained in the web page reference: http://www.mathworks.de/help/techdoc/creating_guis/f10-998412.html#f10-1001546
for getting data from the "button group"...
Maybe the problem is my Matlab version?
Thanks a lot for your answers!
1 个评论
Oleg Komarov
2012-4-5
Not enough information.
You have to post all the relevant code to allow us to run your example, especially the one with the issue.
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!