Specifying icon in questdlg

Versión 1.0.0.0 (24 KB) por Dirk
'buttondlg' enables you to change the icon in the question dialog box.
575 descargas
Actualizado 29 abr 2014

Ver licencia

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

Citar como

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

Compatibilidad con la versión de MATLAB
Se creó con R2013a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Dialog Boxes en Help Center y MATLAB Answers.
Etiquetas Añadir etiquetas
Agradecimientos

Inspirado por: Specifying questdlg position

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.0.0.0