RE: L-shaped custom view in Cocoa?
RE: L-shaped custom view in Cocoa?
- Subject: RE: L-shaped custom view in Cocoa?
- From: Shawn Bakhtiar <email@hidden>
- Date: Wed, 04 May 2011 16:09:42 -0400
- Importance: Normal
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: email@hidden
> Date: Wed, 4 May 2011 19:38:55 +0200
> To: email@hidden
> 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 (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
_______________________________________________
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