• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't set image in NSImageView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Can't set image in NSImageView
      • From: Jens Bauer <email@hidden>
  • Prev by Date: Re: NSColor Deadlock bug?
  • Next by Date: info on a kext.
  • Previous by thread: Re: Can't set image in NSImageView
  • Next by thread: Re: Can't set image in NSImageView
  • Index(es):
    • Date
    • Thread