Re: De-checking Checkboxes



Hi Dave!

You mean:
set(handles.checkbox2,'Value',0)

this de-selects the checkbox with name checkbox2.

Hope that is what you were looking for ?

Bye
Toby

Dave schrieb:

If in a GUI I have two checkboxes: cbox1 and cbox2. When I check one
checkbox how would I de-check the other checkbox?

I.e. to evaluate a check on the first box:

function cbox1_Callback(hObject,eventdata,handles)
if (get(hObject,'Value') == get(hObject,'Max'))
% cbox1 is checked

% How do I deselect cbox2 at this point so that the GUI will only
show one checkbox selected??

end

Thanks.

Dave

.