• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: L-shaped custom view in Cocoa?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: L-shaped custom view in Cocoa?
      • From: Kyle Sluder <email@hidden>
References: 
 >Re: L-shaped custom view in Cocoa? (From: Bertil Holmberg <email@hidden>)

  • Prev by Date: Re: Converting a large project to GC
  • Next by Date: [NSMenu _enableItem} crash
  • Previous by thread: Re: L-shaped custom view in Cocoa?
  • Next by thread: Re: L-shaped custom view in Cocoa?
  • Index(es):
    • Date
    • Thread