Re: Can't set image in NSImageView
Re: Can't set image in NSImageView
- Subject: Re: Can't set image in NSImageView
- From: email@hidden
- Date: Sat, 7 Feb 2004 01:52:56 EST
In a message dated 02/07/2004 00:38:17, email@hidden writes:
>
i'm not sure if NSImage supports .png images, but try this:
>
>
[statusImage setImage:[NSImage imageNamed:@"onstate"]];
>
>
make sure you have your images in the app's Resources directory.
>
>
katsura
>
>
Thanks katsura, I modified what you gave me and resulted with the following
which worked so I guess it supports ".png" type images.
_______________________________________________
NSImage *myImage;
myImage = [NSImage imageNamed:@"onstate"];
[statusImage setImage:myImage]; // show On Icon
_______________________________________________
Should I be using tiffs or some other type of image or does it really matter?
_______________________________________________
Dale
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.