How to replace MATLAB icon from a figure window?
40 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Vieniava
el 30 de En. de 2011
How to replace or delete the MATLAB icon (the peaks) from a figure window?
1 comentario
Bruno Luong
el 30 de En. de 2011
Replacing or altering figure icons violates Matlab license agreement.
Respuesta aceptada
Paulo Silva
el 30 de En. de 2011
replace FIGUREHANDLE with your figure handle, test with gcf
replace PATH with the path, name and extension of the icon for example
C:\Program Files (x86)\MATLAB\R2008b\toolbox\systemtest\systemtest\icons\StopElement.gif
warning('off','MATLAB:HandleGraphics:ObsoletedProperty:JavaFrame');
jframe=get(FIGUREHANDLE,'javaframe');
jIcon=javax.swing.ImageIcon('PATH');
jframe.setFigureIcon(jIcon);
0 comentarios
Más respuestas (2)
Siddharth Shankar
el 30 de En. de 2011
As Bruno says, that would be a breach of the MathWorks license agreement. Specific details here:
4 comentarios
Antony
el 4 de Feb. de 2024
Editada: Antony
el 4 de Feb. de 2024
This answer is pretty old and I've bumped into it a few times, so for the sake of new users,
here's how its done. (BTW, I'm assuming a UI figure).
fig = uifigure("WindowStyle","alwaysontop");
fig.Position = [500 500 1000 445];
pathToMLAPP = fileparts(mfilename('fullpath'));
fig.Icon = fullfile(pathToMLAPP, 'my_icon.png');
0 comentarios
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!