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

조회 수: 15 (최근 30일)
A
A 2012년 12월 20일
편집: VBBV 2020년 11월 27일
I have a radio button group woth 2 buttons; depending on which radiobutton is selected, I want to enable/disable a pushbutton.
  댓글 수: 1
VBBV
VBBV 2020년 11월 27일
편집: VBBV 2020년 11월 27일
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

댓글을 달려면 로그인하십시오.

답변 (1개)

Sean de Wolski
Sean de Wolski 2012년 12월 20일
In the radio button or uibuttongroup callback:
set(handles.pushbutton1,'enable','off');
  댓글 수: 1
Christian Guitart
Christian Guitart 2016년 5월 12일
Hello,
Can you explain me how to do the same task but on programmatic GUI?
Thanks in advance,

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by