how to enable/disable a pushbutton based on a radio selection? (guide gui)

I have a radio button group woth 2 buttons; depending on which radiobutton is selected, I want to enable/disable a pushbutton.

1 Commento

if get(handles.radiobutton1,'Value') == 1
set(handles.pushbutton1,'enable','off');
... % rest of code
elseif get(handles.radiobutton2,'Value') == 1
set(handles.pushbutton2,'enable','off');
... % rest of code
end

Accedi per commentare.

Risposte (1)

In the radio button or uibuttongroup callback:
set(handles.pushbutton1,'enable','off');

1 Commento

Hello,
Can you explain me how to do the same task but on programmatic GUI?
Thanks in advance,

Accedi per commentare.

Categorie

Scopri di più su Graphics Objects in Centro assistenza e File Exchange

Tag

Richiesto:

A
A
il 20 Dic 2012

Modificato:

il 27 Nov 2020

Community Treasure Hunt

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

Start Hunting!

Translated by