• 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: NSView Background
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView Background


  • Subject: Re: NSView Background
  • From: Nicholas Francis <email@hidden>
  • Date: Wed, 7 Jan 2004 02:19:55 +0100

subclass NSView - like this:

@interface MYView : NSView
@end

@implementation MYView
- (void)drawRect:(NSRect)rect {
[[NSColor blackColor]set];
[NSBezierPath fillRect:rect];
}

- (BOOL) isOpaque {
return YES:
}

@end
Nicholas Francis
------------------------------------------------------------------------ -------
Scheduling fascist - Over The Edge Entertainments

On Jan 7, 2004, at 1:53 AM, Denis Vaillant wrote:

Hi,

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
?

Thx

Denis
_______________________________________________
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.
_______________________________________________
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.

References: 
 >NSView Background (From: Denis Vaillant <email@hidden>)

  • Prev by Date: Re: NSView Background
  • Next by Date: Access individual cell in NSTableView row
  • Previous by thread: Re: NSView Background
  • Next by thread: Access individual cell in NSTableView row
  • Index(es):
    • Date
    • Thread