Partially opaque window with opaque views
Partially opaque window with opaque views
- Subject: Partially opaque window with opaque views
- From: Trygve Inda <email@hidden>
- Date: Tue, 05 Oct 2010 10:25:45 +0000
- Thread-topic: Partially opaque window with opaque views
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?
My NSWindow subclass looks like:
[self setOpaque:NO];
[self setHasShadow: YES];
[self setLevel:NSFloatingWindowLevel];
[self setAlphaValue:0.50];
This sets the alpha of the whole window to 50% (and works) but If I add a
line or replace the alpha line with: [[self contentView]
setAlphaValue:0.50];
Then the window is totally opaque... Even subviews in the main contentView.
Any way to do this w/o using multiple windows?
Trygve
_______________________________________________
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