• 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: Partially opaque window with opaque views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Partially opaque window with opaque views


  • Subject: Re: Partially opaque window with opaque views
  • From: Uli Kusterer <email@hidden>
  • Date: Fri, 15 Oct 2010 12:56:16 +0200

On Oct 5, 2010, at 12:25 PM, Trygve Inda wrote:
> Is there a way to have a window with a 50% opaque background, but several
> odd-shaped views that are 100% opaque? The dock does this but seems be one
> window per icon. Can I do it all as one window?

 Look into NSBorderlessWindowMask. You may also have to set the window's background color to clearColor, or replace its content view with one that erases itself, and may or may not have to subclass NSWindow to override isOpaque. (it's all a bit hazy how I did that last time and I can't look it up ATM)

 You can then draw on top of this transparent, rectangular canvas with NSViews and whatever shapes and alpha values you want to make something like the dock.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."



_______________________________________________

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

References: 
 >Partially opaque window with opaque views (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: Identifying Cocoa Methods
  • Next by Date: HUD Window from Service?
  • Previous by thread: Re: Partially opaque window with opaque views
  • Next by thread: NSOutlineView multi cell type binding query
  • Index(es):
    • Date
    • Thread