• 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 17:20:44 EST

In a message dated 02/07/2004 10:02:12, email@hidden writes:

>try something like this:
>
> NSString *myImageName = @"onstate.png";
> NSImage *myImage = [NSImage imageNamed: myImageName];
> [statusImage setImage:myImage];
>
>See the description of "imageNamed" in the NSImage docs.
>
>-lance
>
_______________________________________________

Thanks for the reply Lance but I think:

NSImage *myImage;
myImage = [NSImage imageNamed:@"onstate"];
[statusImage setImage:myImage]; // show On Icon

is a more politically correct.

_______________________________________________

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.

  • Prev by Date: Re: NSSavePanel, background-only app, "Replace?" alert ordering
  • Next by Date: Handling Multiple NSURLConnections
  • Previous by thread: Re: Can't set image in NSImageView
  • Next by thread: info on a kext.
  • Index(es):
    • Date
    • Thread