Re: NSView Background
Re: NSView Background
- Subject: Re: NSView Background
- From: Matt Gemmell <email@hidden>
- Date: Wed, 7 Jan 2004 01:17:03 +0000
On Jan 7, 2004, at 12:53 am, Denis Vaillant wrote:
I looked carefully the NSView methods and I didn't find one that would
enable me to set the color background of the view.
I would like to fill the background of a NSView in black. How can I do
that
?
You can create a subclass of NSView and in its drawRect: method, use
code something like this:
[[NSColor blackColor] set];
NSRectFill(rect);
/* where rect is the NSRect passed to the drawRect: method. */
Cheers,
-Matt
--
Matt Gemmell
Irate Scotsman
http://iratescotsman.com/
_______________________________________________
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.