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

101 vues (au cours des 30 derniers jours)
Isaac Marín
Isaac Marín le 10 Jan 2020
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
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

Isaac Marín
Isaac Marín le 14 Mai 2020
  2 commentaires
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.

Plus de réponses (3)

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.

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.

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
  2 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.

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