Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
Why isn't my NSBox setting it's fill color to green like i'm stating in my code? i've tried setting it's border width, border color, nothing seems to affect it... what am i doing wrong?

Code:
-(void)awakeFromNib
	{
	DropBox *box = [[DropBox alloc] initWithFrame:NSMakeRect(140, 100, 125, 100)];
	[box setAutoresizingMask:NSViewMinYMargin];
	[box setTitle:@"Drop Stuff Here"];  [COLOR="Green"]//this works, it's sets the box's title[/COLOR]
	[box setFillColor:[NSColor greenColor]];  [COLOR="Green"]//this doesn't work[/COLOR]
	[[self contentView] addSubview:box];
	}
 
Functional only when the receiver’s box type (boxType) is NSBoxCustom and its border type (borderType) is NSLineBorder.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.