change NSView background color
change NSView background color
- Subject: change NSView background color
- From: "Ahmet Taha Sakar" <email@hidden>
- Date: Sat, 14 Apr 2007 19:17:02 -0700
Hello,
I have the following code:
- (void)drawRect:(NSRect)rect
{
rect = [self bounds];
[NSColor blueColor] set];
[NSBezierPath fillRect: rect];
}
- (void) changeColor: (NSColor *)c
{
[[NSColor blackColor] set];
[NSBezierPath fillRect: [self bounds]];
}
with the drawRect method, I get to have the NSView in blue color.
However, I would like to change the color with an action so I created
changeColor method. But I cant get it to change the color. What am I
missing? thnaks
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden