Actually you only need one view. Subclass it, and over ride the draw method 



[[NSColor clearColor] set]
NSFillRect(...) <- the size you want to clear out. 

If you want the cut out to be more sofisticated, you can use NSBeizerPath and 
fill it with the clear color.

You will not receive any signals when the mouse is in the clear area, and if 
this is a top level window, if you re-pop the shadow on the window, it will 
draw the shadow in the same shape with clear part cut out. Any window, or other 
view under yours will receive the mouse movements inside the clear area.

:)



You can also create a single view, and do the same th

> From: bertilholmb...@telia.com
> Date: Wed, 4 May 2011 19:38:55 +0200
> To: cocoa-dev@lists.apple.com
> Subject: Re: L-shaped custom view in Cocoa?
> 
> You can create it from two rectangular views, perhaps rotating the one, 
> depending on your needs.
> 
> Regards,
> Bertil_______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/shashaness%40hotmail.com
> 
> This email sent to shashan...@hotmail.com
                                          
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to