Effacer les filtres
Effacer les filtres

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

8 vues (au cours des 30 derniers jours)
A
A le 20 Déc 2012
Modifié(e) : VBBV le 27 Nov 2020
I have a radio button group woth 2 buttons; depending on which radiobutton is selected, I want to enable/disable a pushbutton.
  1 commentaire
VBBV
VBBV le 27 Nov 2020
Modifié(e) : VBBV le 27 Nov 2020
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

Connectez-vous pour commenter.

Réponses (1)

Sean de Wolski
Sean de Wolski le 20 Déc 2012
In the radio button or uibuttongroup callback:
set(handles.pushbutton1,'enable','off');
  1 commentaire
Christian Guitart
Christian Guitart le 12 Mai 2016
Hello,
Can you explain me how to do the same task but on programmatic GUI?
Thanks in advance,

Connectez-vous pour commenter.

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by