Specifying icon in questdlg

Versione 1.0.0.0 (24 KB) da Dirk
'buttondlg' enables you to change the icon in the question dialog box.
575 download
Aggiornato 29 apr 2014

Visualizza la licenza

'buttondlg' is a simple modification of MATLABs function QUESTDLG which enables the user to change the icon in the dialog box, known from the MATLAB function MSGBOX. Available icons are the same known from MSGBOX ('none', 'warn', 'error', 'help', 'custom'), but also 'quest' (known from the original QUESTDLG) and 'bulb'. If you choose 'custom', you also have to specify IconData and optional IconCMap, also known form fhe function MSGBOX. Best icon size is [50,50].

Examples (as shown in the image):

Example 1:

Button=buttondlg('System Error!','Error','Stop','Continue', struct('Default','Continue','IconString','error'));

Example 2:

Button=buttondlg('Do you like the color icon?','Question','Yes','Maybe','No',struct('Default','Yes','IconString','custom','IconData',uint8(rand(50,50,3).*256)));
% is the same like:
S.Default = 'Yes';
S.IconString = 'custom';
S.IconData = uint8(rand(50,50,3).*256);
Button=buttondlg('Do you like the color icon?','Question','Yes','Maybe','No',S);

Example 3:

options.Interpreter = 'tex';
options.Default = 'Don''t know';
options.IconString = 'none';
qstring = 'Is \Sigma(\alpha - \beta) < 0?';
title = 'Boundary Condition';
Button = buttondlg(qstring,title,'Yes','No','Don''t know',options)

Cita come

Dirk (2024). Specifying icon in questdlg (https://www.mathworks.com/matlabcentral/fileexchange/46401-specifying-icon-in-questdlg), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2013a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Dialog Boxes in Help Center e MATLAB Answers
Riconoscimenti

Ispirato da: Specifying questdlg position

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.0.0.0