Effacer les filtres
Effacer les filtres

How can I change the title bar icon of my app?

125 vues (au cours des 30 derniers jours)
Isaac Marín
Isaac Marín le 10 Jan 2020
Commenté : Steve Zissou le 7 Fév 2024
In license agreement it is said:
3.1. MATLAB Compiler
vi) You may not modify or remove any proprietary notices included with Programs or Program Components. However, you are permitted to remove the MathWorks logo icon within the figure title bar of your Application and replace it with a different icon.
But how can I do that? There is an option in the compiler to add an icon, but when the app is opened, the Mathworks logo is displayed.
I am using App Designer, so the javaframe option is not available.
  2 commentaires
Joris Lambrecht
Joris Lambrecht le 22 Fév 2020
+1 for the importance of this. It seems the license agreement has changed and we are now allowed to change the icon, so a lot of older posts on this forum are no longer accurate. But like Isaac says, how!?
I also want to change the icon in the top left of figure AND the icon used on the Windows Taskbar so the compiled app doesn't show up in my group of open Matlab windows. I tried using a resource editor (ResourceHacker and ResourceTuner) to change the icons. The installer in the "for_redistribution" folder did not contain any Matlab icons, only the custom icon that can be added using the Application CompilerWith ResourceTuner. With Resource Tuner, however, I was able to replace all the Matlab icons in the .exe from "for_redistribution_files_only" folder with my custom icon. But when I ran the .exe it still shows the Matlab icon! I assume the icon is therefore coming from the MCR, and I think it would be against the license agreement to modify the MCR.
PierreC le 7 Mai 2020
+1 as well ... This is pretty annoying, especially when you'd want to use different icons for different app windows (in order to identify them quickly).

Connectez-vous pour commenter.

Réponse acceptée

Cris LaPierre
Cris LaPierre le 29 Nov 2020
Starting with R2020b, there is now an icon property. You can use it to "specify custom icons for UI figure windows and toolbar push and toggle tools". You can see more under "App Building" in the release notes for R2020b.
To specify a custom icon, set the Icon property value to an image file or an m-by-n-by-3 truecolor array. See here in the UIFigure Properties.

Plus de réponses (3)

Ganesh Regoti
Ganesh Regoti le 14 Jan 2020
  1 commentaire
Isaac Marín
Isaac Marín le 14 Jan 2020
The link doesn't have a solution for this problem, i'm using MATLAB compiler R2019b

Connectez-vous pour commenter.

Isaac Marín
Isaac Marín le 14 Mai 2020
  2 commentaires
Ajay Kumar
Ajay Kumar le 14 Mai 2020
Modifié(e) : Ajay Kumar le 14 Mai 2020
The thread is too confusing. Did you find the exact answer? if yes whose answer is it?
Or by your conclusion, can we change the icon or not?
Isaac Marín
Isaac Marín le 14 Mai 2020
Is the aswer referenced in the link, it uses a custom function called "getWebWindowOfUiFigure", and it works to change the icon.

Connectez-vous pour commenter.

Bereketab Gulai
Bereketab Gulai le 19 Juin 2020
Here is the real solution R2019b and above:
hUIFig = uifigure; % allow this to load first (run it separately from the below code)
% Find the CEF window for the running app's figure: this idea
% comes from DesktopFigureService MALTAB internal class (courtesy)
cefWindowList = matlab.internal.webwindowmanager.instance.windowList;
url = matlab.ui.internal.FigureServices.getFigureURL(hUIFig);
[idx] = arrayfun(@(ww)strcmp(url,ww.URL), cefWindowList);
hWin = cefWindowList(idx);
hWin.Icon = which('your-icon.ico'); % must be ico file
  3 commentaires
Bereketab Gulai
Bereketab Gulai le 22 Juin 2020
Even when the app is deployed you can use
making sure that the icon is included in the resources list in the compiler.
  • I did not understand about the "Windows still clusters the App along with other Matlab 2019b windows, even when deployed. ". It would be good to see a picture or illustration, more description.
  • Do you mean the windows on the taskbar show under the other RUNNING MATLAB APPs? If so, probably there is no solution to this, probably MATLAB apps of the same version (R2019b...) probably have something in common while running, thus windows groups as so. You could post a question about that in case some experts have a solution.
Steve Zissou
Steve Zissou le 7 Fév 2024
Using 2023b
I am using the Application Compiler APPS to build our application on both mac and windows. We now have a mixture of figure and uifigures for the different tools in the application. When the application is compiled, installed, and opened on macOS Ventura the uifigure figures have the matlab icon on the Docker bar instead of our icon (orange with squiggles). I had to implement the matlab.internal.webwindowmanager.instance.windowList code from this answer above to get the uifigure icons correct on the windows computer, but on mac it is still broken. I have tried using both .ico and icns images for the icon, with the same result.

Connectez-vous pour commenter.


En savoir plus sur Develop uifigure-Based Apps dans Help Center et File Exchange




Community Treasure Hunt

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

Start Hunting!

Translated by