2013-11-15 94 views
-2

我想單擊單選按鈕時繪製座標軸。 uipanel沒有回調函數。我可以通過get(eventdata.NewValue,'Tag');從電臺獲取一個按鈕的值。uipanel回調函數

回答

1

...但單選按鈕有所回調:

使用指南時,你會得到:

% --- Executes on button press in radiobutton1. 
function radiobutton1_Callback(hObject, eventdata, handles) 
% hObject handle to radiobutton1 (see GCBO) 
% eventdata reserved - to be defined in a future version of MATLAB 
% handles structure with handles and user data (see GUIDATA) 

% Hint: get(hObject,'Value') returns toggle state of radiobutton1 

不使用指南時:

剛剛設置的callback->

set(handleOfRadioButton,'Callback',@myCallbackFunction)