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 commentaire

Vasista Adupa
Vasista Adupa le 11 Août 2020
I have the exact same query. disabling a option in the questdlg choices.

Connectez-vous pour commenter.

 Réponse acceptée

Arthur Roué
Arthur Roué le 11 Août 2020

0 votes

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 commentaires

Mark Golberg
Mark Golberg le 11 Août 2020
Modifié(e) : Mark Golberg le 11 Août 2020
That would be great. Could you show me how to prepare a simple question box with 2 buttons, where I can enable/disable the buttons.
THANKS!!!
Arthur Roué
Arthur Roué le 12 Août 2020
What is your MATLAB release ? If R2016a or older you have to use GUIDE components (figure), otherwise go for App Designer components (uifigure).
Mark Golberg
Mark Golberg le 12 Août 2020
R2015a.
could you send me the code for GUIDE components?
Arthur Roué
Arthur Roué le 13 Août 2020
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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur App Building dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by