MATLAB Answers


Illogical and strange behavior of the Gui button group s

David Dapuero 님이 질문을 제출함. 4 Apr 2012
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]')
I am using the code this way becouse it is not possible using the way explained in the web page reference:
for getting data from the "button group"...
Maybe the problem is my Matlab version?
Thanks a lot for your answers!

  댓글 수: 1

Not enough information.
You have to post all the relevant code to allow us to run your example, especially the one with the issue.

로그인 to comment.

답변 수: 1

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

  댓글 수: 0

로그인 to comment.

Translated by