How to workaround SWTResourceManager.getImage
samhuatgmailnotwork. at gmail.com
Sun Oct 6 02:46:38 PDT 2013
On Sunday, 6 October 2013 at 08:52:39 UTC, Jacob Carlborg wrote:
> On 2013-10-06 08:35, samhu wrote:
>> I am trying to compile below dummyeclipse project ,but first
>> encountered the subjected issue.I knew to form a Image object
>> can use:
>> Image image=new Image(display,imgfilename);//e.g. smile.jpg
>> But I don't know how to load from a resource file(*.res) to
>> a image as used in DWT java:
>> (new Label).setImage(SWTResourceManager.getImage("PROP_PS",
> I really don't see the difference between
> "SWTResourceManager.getImage" and "new Image". The only thing
> that SWTResourceManager does in addition is cache the image.
> SWTResourceManager is not part of standard SWT, it a part of
> You can also port it do D :
Sorry.But do you mean with new Image can also work on *.res file?
There is only one resource.res file which contains the above
mentioned PROP_PS_GIFFILE ,please note there is no somefile.gif
or somefile.jpg for the project.
More information about the Digitalmars-d-dwt