필터 지우기
필터 지우기

SelectionChangeFcn not receiving handles

조회 수: 2 (최근 30일)
Bob
Bob 2011년 7월 5일
I'm trying to have a gui (made using GUIDE) run some code when the selection of a radio button is changed.
The radio buttons are in a uipanel, I have added the following to the OpeningFcn:
set(handles.uipanel1,'SelectionChangeFcn',@uipanel1_SelectionChangeFcn);
and defined the SelectionChangeFcn as:
function uipanel1_SelectionChangeFcn(hObject, eventdata, handles)
who
However, the output of 'who' is:
Your variables are:
eventdata hObject
Is there a way to pass the handles structure to it too? I have a function that updates the gui, based on the contents of handles which I want to call from the SelectionChangeFcn.
Cheers

채택된 답변

Paulo Silva
Paulo Silva 2011년 7월 5일
set(handles.uipanel1,'SelectionChangeFcn',...{@uipanel1_SelectionChangeFcn,handles});

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by