Thread Subject: How to change a gui's figure icon

Subject: How to change a gui's figure icon

From: Daniel

Date: 26 Jun, 2008 15:21:02

Message: 1 of 6

I am writing a large multi-windowed GUI in MATLAB and I
would like the window (figure) icon for each window to be
different.

What I mean when I say 'window icon' is the small picture
just to the left of the window's title, and the image that
shows up in the minimized version of the program on the
Windows taskbar.

I am familiar with adding icons to uibuttons, but do not
know how to change this property of a figure.

Thanks!
Daniel

Subject: How to change a gui's figure icon

From: matt dash

Date: 26 Jun, 2008 15:46:02

Message: 2 of 6

"Daniel " <anothermathgeek+matlab@gmail.com> wrote in
message <g40c4u$h4b$1@fred.mathworks.com>...
> I am writing a large multi-windowed GUI in MATLAB and I
> would like the window (figure) icon for each window to be
> different.
>
> What I mean when I say 'window icon' is the small picture
> just to the left of the window's title, and the image that
> shows up in the minimized version of the program on the
> Windows taskbar.
>
> I am familiar with adding icons to uibuttons, but do not
> know how to change this property of a figure.
>
> Thanks!
> Daniel

warning('off','MATLAB:HandleGraphics:ObsoletedProperty:JavaFrame');
jframe=get(handles.fig,'javaframe');
jIcon=javax.swing.ImageIcon('C:\program
files\matlab\r2007b\icons\icon.gif');
jframe.setFigureIcon(jIcon);

(while supplies last)



Subject: How to change a gui's figure icon

From: Daniel

Date: 26 Jun, 2008 16:26:02

Message: 3 of 6

Ok, tried it. But I receive the following error:

Error in ==> hddprofile_editor>setWindowTitleIcon at 71
jframe=get(handles.fig,'javaframe');

Apparently my handles structure contains no property 'fig'.
Any ideas? I am in R2007a.

Subject: How to change a gui's figure icon

From: matt dash

Date: 26 Jun, 2008 16:50:19

Message: 4 of 6

"Daniel " <anothermathgeek+matlab@gmail.com> wrote in
message <g40fuq$2gh$1@fred.mathworks.com>...
> Ok, tried it. But I receive the following error:
>
> Error in ==> hddprofile_editor>setWindowTitleIcon at 71
> jframe=get(handles.fig,'javaframe');
>
> Apparently my handles structure contains no property 'fig'.
> Any ideas? I am in R2007a.


Sorry, i pasted that out of a gui. handles.fig is the handle
of the figure whose icon you want to change.

Subject: How to change a gui's figure icon

From: doyle.tla@gmail.com

Date: 29 Jul, 2008 12:01:54

Message: 5 of 6

On Jun 27, 12:50=A0am, "matt dash" <n...@mail.com> wrote:
> "Daniel " <anothermathgeek+mat...@gmail.com> wrote in
> message <g40fuq$2g...@fred.mathworks.com>...
>
> > Ok, tried it. But I receive the following error:
>
> > Error in =3D=3D> hddprofile_editor>setWindowTitleIcon at 71
> > jframe=3Dget(handles.fig,'javaframe');
>
> > Apparently my handles structure contains no property 'fig'.
> > Any ideas? I am in R2007a.
>
> Sorry, i pasted that out of a gui. handles.fig is the handle
> of the figure whose icon you want to change.

Wow I didn't think that could be done at all. I have asked Mathworks
about that before and was told it can't be done.

I am considering selling some guis, so if I do that and pay the $15k+
I would be pretty annoyed that I couldn't brand it.

Thanks, matt_dash

Tim.

Subject: How to change a gui's figure icon

From: Bruno Luong

Date: 29 Jul, 2008 12:23:01

Message: 6 of 6

You should be aware that by changing the icone you would
violate Mathworks license agreement.

Bruno

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
iconsi ra ti 23 Sep, 2008 14:50:41
figure Daniel 26 Jun, 2008 11:27:26
window Daniel 26 Jun, 2008 11:27:26
gui Daniel 26 Jun, 2008 11:27:26
icon Daniel 26 Jun, 2008 11:27:26
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com