How can I change the title bar icon of my app?
69 views (last 30 days)
Show older comments
Isaac Marín
on 10 Jan 2020
Commented: Steve Zissou
on 7 Feb 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 Comments
Joris Lambrecht
on 22 Feb 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
on 7 May 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).
Accepted Answer
Cris LaPierre
on 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.
0 Comments
More Answers (3)
Isaac Marín
on 14 May 2020
2 Comments
Ajay Kumar
on 14 May 2020
Edited: Ajay Kumar
on 14 May 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?
Bereketab Gulai
on 19 Jun 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 Comments
Bereketab Gulai
on 22 Jun 2020
Even when the app is deployed you can use
which('myIcon.ico');
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
on 7 Feb 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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1609906/image.png)
See Also
Categories
Find more on Develop uifigure-Based Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!