How can I change the icon of my AppDesigner-produced GUIs?

34 ビュー (過去 30 日間)
Micke Malmström
Micke Malmström 2018 年 3 月 19 日
コメント済み: Cris LaPierre 2025 年 7 月 11 日
I would like to easily distinguage my GUI from the figures when pressing Alt+Tab so I can access it faster. Now when I run the GUIs they have the same icon as a regular figure...
  4 件のコメント
Marc McLean
Marc McLean 2019 年 4 月 19 日
How do you change the icon in the upper left of the .mlappp GUI launched from AppDesigner?
icon.jpg
Mohammed Majid Msallam
Mohammed Majid Msallam 2020 年 3 月 4 日
also me

サインインしてコメントする。

採用された回答

Cris LaPierre
Cris LaPierre 2020 年 10 月 29 日
Starting with R2020b, you can now specify custom icons for UI figure windows and toolbar push and toggle tools. See the release notes here.
  1 件のコメント
Cris LaPierre
Cris LaPierre 2025 年 7 月 11 日
The Icon property became available in regular figures starting in R2025a. See here.

サインインしてコメントする。

その他の回答 (2 件)

li li
li li 2021 年 12 月 11 日
編集済み: li li 2021 年 12 月 11 日
R2020b OR Last version
function startupFcn(app)
app.uifigure .Icon='logo.png';
end
OK!

Robert
Robert 2020 年 10 月 29 日
Add this to your startupFcn:
t = 0;
tMax = 5;
dt = 0.1;
while ~isfield(struct(struct(app.UIFigure).Controller), 'PlatformHost') && t < tMax
% Keep waiting until the window is found.
t = t + dt;
pause(dt)
end
win = struct(struct(struct(app.UIFigure).Controller).PlatformHost).CEF;
win.Icon = 'C:\Folder\MyIcon.ico';
Of course, you may have renamed the UIFIgure property of your app.
In R2016b and older, replace 'PlatformHost' with 'Container'.

カテゴリ

Help Center および File ExchangeDesktop についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by