Re: NSDrawNinePartImage not working ?
Re: NSDrawNinePartImage not working ?
- Subject: Re: NSDrawNinePartImage not working ?
- From: Graham Cox <email@hidden>
- Date: Mon, 15 Feb 2010 16:45:24 +1100
On 15/02/2010, at 4:36 PM, Sandro Noël wrote:
> - (void) awakeFromNib{
> NSDrawNinePartImage([[window contentView]frame],
> nil,
> nil,
> nil,
> [NSImage imageNamed:@"right3.png"],
> nil,
> [NSImage imageNamed:@"left3.png"],
> [NSImage imageNamed:@"right4.png"],
> [NSImage imageNamed:@"left5.png"],
> [NSImage imageNamed:@"left4.png"],
> NSCompositeClear,
> 1.0,
> NO);
>
> I looked in the docsa little but did not find any indication that i had to provide a Graphics context.
>
> any pointers ?
You can't draw at this time.
With a view you must draw in -drawRect:, for a window there is probably a different place you need to override to draw the window's frame - though I haven't done it myself a quick look through the methods of NSWindow suggests that -display is likely to be the right place. I think there is sample code to show how to render a custom window, so try a search of ADC.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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