How to replace MATLAB icon from a figure window?
조회 수: 46 (최근 30일)
이전 댓글 표시
How to replace or delete the MATLAB icon (the peaks) from a figure window?
댓글 수: 1
채택된 답변
Paulo Silva
2011년 1월 30일
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
추가 답변 (2개)
Siddharth Shankar
2011년 1월 30일
As Bruno says, that would be a breach of the MathWorks license agreement. Specific details here:
Antony
2024년 2월 4일
편집: Antony
2024년 2월 4일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!