Borrar filtros
Borrar filtros

How can i get value of another function in gui

3 visualizaciones (últimos 30 días)
Jakub
Jakub el 14 de Abr. de 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!!

Respuesta aceptada

Image Analyst
Image Analyst el 14 de Abr. de 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');

Más respuestas (0)

Categorías

Más información sobre Graphics Object Programming en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by