creating message dialog box

4 visualizaciones (últimos 30 días)
rahman
rahman el 1 de Oct. de 2011
Hi all
I want to create a message dialog box with an arbitrary figure.How can I do that?

Respuesta aceptada

Jan
Jan el 1 de Oct. de 2011
For IconData and IconCMap you can look in the source code of msgbox by "edit msgbox":
a = load('dialogicons.mat');
IconData = a.warnIconData;
IconCMap = a.warnIconMap;
IconCMap(256, :) = get(figureHandle,'Color'); % Pseudo transparence
See also imread
  1 comentario
Walter Roberson
Walter Roberson el 2 de Oct. de 2011
Right. And thus to use your own icon, either create your own msgbox-like routine starting with the msgbox source, or else ensure that you have your own dialogicons.mat file earlier on the matlab path than would otherwise be the case.

Iniciar sesión para comentar.

Más respuestas (1)

Grzegorz Knor
Grzegorz Knor el 1 de Oct. de 2011
msgbox create and open message box:
doc msgbox
See also:
doc dialog
  2 comentarios
rahman
rahman el 1 de Oct. de 2011
tnx
But how can I define IconData and IconCMap?
Walter Roberson
Walter Roberson el 2 de Oct. de 2011
IconData should be an indexed image, and IconCMap should be the corresponding 256 entry color map, with entry 256 reserved for "transparent" pixels.

Iniciar sesión para comentar.

Categorías

Más información sobre Dialog Boxes en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by