Loading Images

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Loading Images

Postby asamoal » Fri Aug 15, 2003 6:21 am

From this
Code: Select all
cLabel.setBackground(ResourceManager.getImage(Jat01.class, "org/eclipse/swt/examples/hoverhelp/Bdny2.jpg"));


the com.sun.naming.internal.ResourceManager does not have this getImage so which one are you using?

In another case using setImage on the CLabel is not supported in the Inspector. only the bg image works. although it runs ok.... Do you happen to know how to use setImage in a 'relative path' situation? Or do I have to write a helper to store the loc and then i pass it to setImage on the CLabel.

:?: :!:
//Leslie
asamoal
 
Posts: 24
Joined: Wed Aug 13, 2003 2:56 am
Location: Finland

Re: Loading Images

Postby admin » Sat Aug 16, 2003 8:02 pm

asamoal wrote:From this
Code: Select all
cLabel.setBackground(ResourceManager.getImage(Jat01.class, "org/eclipse/swt/examples/hoverhelp/Bdny2.jpg"));


the com.sun.naming.internal.ResourceManager does not have this getImage so which one are you using?

Yes, designer uses its own ResourceManager. Look in directory "src" in Designer plugin directory.

asamoal wrote:In another case using setImage on the CLabel is not supported in the Inspector. only the bg image works. although it runs ok.... Do you happen to know how to use setImage in a 'relative path' situation? Or do I have to write a helper to store the loc and then i pass it to setImage on the CLabel.
:?: :!:

Yes, Designer before version 1.0.4 does not supports setImage for CLabel, I just forgot to add it. Now it is supported.
admin
Moderator
 
Posts: 166
Joined: Thu Jul 24, 2003 12:25 am


Return to SWT Designer

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest