Filter löschen
Filter löschen

How can i get value of another function in gui

3 Ansichten (letzte 30 Tage)
Jakub
Jakub am 14 Apr. 2013
How can i get value of checkbox inside another fuction?
For example:
function checkbox1_Callback(hObject, eventdata, handles)
....
....
function checkbox2_Callback(hObject, eventdata, handles)
%here i need to check state of function checkbox1
thanks!!

Akzeptierte Antwort

Image Analyst
Image Analyst am 14 Apr. 2013
Simply use the get() function:
function checkbox2_Callback(hObject, eventdata, handles)
% Get the check state of checkbox1
checkbox1Value = get(handles.checkbox1, 'value');
% Now also get the check state of checkbox2
checkbox2Value = get(handles.checkbox2, 'value');

Weitere Antworten (0)

Kategorien

Mehr zu Graphics Object Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by