Illogical and strange behavior of the Gui button group s

조회 수: 1 (최근 30일)
David Dapuero
David Dapuero 2012년 4월 4일
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
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개)

David Dapuero
David Dapuero 2012년 4월 5일
I am getting information from the radio buttons in a direct way and not through the uibuttongroup... this way:
function cogeData_y_ponimagen(handles) dataimg.Hor_Teilleiteranordnung=get(handles.radiobutton_Hor_Teilleiteranordnung,'Value'); dataimg.Hor_Hauptleiteranordung=get(handles.Hor_Hauptleiteranordung,'value');
Can it be the cause for my uibutton groups loosing their´s functionallity?
If you want the code of the GUI and de fig file I can send you.
Thanks a lot! David Dapuero

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by