Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » change Icon in Label
change Icon in Label [message #235659] Thu, 14 June 2007 08:36 Go to next message
Eclipse UserFriend
Originally posted by: one.eight.three.gmail.com

hi,

i have a figure with a label. this label has an icon and a text.
i would like to change the image when certain event happens.

i added a method in my shape to set the new image. this calls the
fireproperty. which then calls the figure to label.setIcon(Image);

however, nothing happens. anyone has successfully implemented this?
Re: change Icon in Label [message #235699 is a reply to message #235659] Thu, 14 June 2007 14:13 Go to previous messageGo to next message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
Hi Janice

You are calling refreshVisuals() in your EditPart ?

Cheers...
Anthony

"janice" <one.eight.three@gmail.com> wrote in message
news:55ea827fe790350c89ad0264617d8295$1@www.eclipse.org...
> hi,
>
> i have a figure with a label. this label has an icon and a text.
> i would like to change the image when certain event happens.
>
> i added a method in my shape to set the new image. this calls the
> fireproperty. which then calls the figure to label.setIcon(Image);
>
> however, nothing happens. anyone has successfully implemented this?
>
Re: change Icon in Label [message #235944 is a reply to message #235699] Tue, 19 June 2007 05:32 Go to previous message
Eclipse UserFriend
Originally posted by: one.eight.three.gmail.com

hi,

realised i forgot to call refreshVisuals(). so i added the call but still
no change.

i tried disposing the Label and creating a new one with the new image. but
its still the old image. i tried calling the repaint() method too. but
nothing.
Previous Topic:Wide Labels below small figures
Next Topic:Graphics setAlpha() and connectors
Goto Forum:
  


Current Time: Sun Oct 02 13:22:16 GMT 2022

Powered by FUDForum. Page generated in 0.02689 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top