![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/174033/image.png)
hi, please how can I create a question dialog to leave the interface when I click in the red button .thank you for help
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Risposte (1)
MBD4FUN
il 8 Apr 2016
Modificato: MBD4FUN
il 8 Apr 2016
Is this what you want? (note: different look and feel for Windows OS)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/174033/image.png)
button = questdlg('Are you sure to quit?','Question','Yes','No','No');
switch button
case 'Yes',
quit
case 'No',
quit cancel;
end
A similar example is also provided by the Matlab help documentations. Have a look at it by typing "help quit" and hit enter at the Matlab Command Window. Sometimes do a little research by using the Matlab help documents could solve many problems.
Cheers, MBD4FUN
0 Commenti
Vedere anche
Categorie
Scopri di più su Startup and Shutdown in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!