How to Disable Button in Dialog Box

조회 수: 8 (최근 30일)
Mark Golberg
Mark Golberg 2020년 8월 9일
댓글: Arthur Roué 2020년 8월 13일
Hello
btnOpt_1 = 'Collect new data';
btnOpt_2 = 'Use saved data';
answer = questdlg('Please choose data source :' , 'FilterWheel' , btnOpt_1 , btnOpt_2 , btnOpt_2);
I want my btnOpt_1 to be Disabled (grayed-out). How can this be done?
THANK YOU!
  댓글 수: 1
Vasista Adupa
Vasista Adupa 2020년 8월 11일
I have the exact same query. disabling a option in the questdlg choices.

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

채택된 답변

Arthur Roué
Arthur Roué 2020년 8월 11일
You cannot disable a button using questdlg function. The only thing you can do is to remove the option.
If you do want a grayed-out button, build your own GUI, I can help you if you need help on this point, just ask in comment.
  댓글 수: 4
Mark Golberg
Mark Golberg 2020년 8월 12일
R2015a.
could you send me the code for GUIDE components?
Arthur Roué
Arthur Roué 2020년 8월 13일
If you launch GUIDE (write guide in command window), one of the template is a modal question dialog box.
You can start with this example, and correct the code as you wish.

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

추가 답변 (0개)

카테고리

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