• 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
NSImage doesn't accept background color?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSImage doesn't accept background color?


  • Subject: NSImage doesn't accept background color?
  • From: Lance Drake <email@hidden>
  • Date: Sat, 25 Sep 2004 08:21:18 -0600

An NSimageView* myImageView exists but it's empty of an image.

Test: add an image to the image view - it WILL/DOES display.

If I have no image - I would like to, instead, show a color.
I create an NSImage* image = [[NSImage alloc] initWithsize: size];
The 'size' of the NSImage can be confirmed as being set correctly.
There is an NSColor* myColor that has been initialized;
I call [image setBackgroundColor:myColor];
[myImageView setImage:image];

The result: Nothing is displayed.

Can anyone suggest what is wrong or if there is some other way to handle this?

Thanks!

Lance Drake

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSImage doesn't accept background color?
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Re: How to draw a rectangle in a NSView
  • Next by Date: Re: Multiple Inheritence (Was: Is _objc_flush_caches_(Class) necessary to swizzle methods?)
  • Previous by thread: Rectangle around object
  • Next by thread: Re: NSImage doesn't accept background color?
  • Index(es):
    • Date
    • Thread