Specifying icon in questdlg

Version 1.0.0.0 (24 KB) von Dirk
'buttondlg' enables you to change the icon in the question dialog box.
575 Downloads
Aktualisiert 29. Apr 2014

Lizenz anzeigen

'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)

Zitieren als

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

Kompatibilität der MATLAB-Version
Erstellt mit R2013a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Dialog Boxes finden Sie in Help Center und MATLAB Answers
Quellenangaben

Inspiriert von: Specifying questdlg position

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0.0