Re: Partially opaque window with opaque views
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