• 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: Transparent content view of NSWindow clicks through
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Transparent content view of NSWindow clicks through


  • Subject: Re: Transparent content view of NSWindow clicks through
  • From: Brett Powley <email@hidden>
  • Date: Sun, 15 Jun 2008 08:32:22 +1000

The things I found you have to do to get this working are, for your subclass of NSWindow are:

		[self setIgnoresMouseEvents:NO];
		[self setBackgroundColor:[NSColor clearColor]];
		[self setOpaque:NO];

and also override

	-(BOOL) canBecomeKeyWindow

to return YES

Cheers,
Brett



On 15/06/2008, at 6:05 AM, John Joyce wrote:

I'm toying with using a transparent content view of an NSWindow.
Of course, when you get the background totally transparent, you click in the rect, it clicks through to activate whatever is behind the window. Does anybody know a way to have that much transparency and not click through?
I'm sure it's possible to render a background image that is whatever is behind the window, but that might eat up more processing than would be practical.


(yes, I have gone over the sample code, RoundTransparentWindow )


_______________________________________________

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:
@process.com.au


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


References: 
 >Transparent content view of NSWindow clicks through (From: John Joyce <email@hidden>)

  • Prev by Date: Core Text: Determining Line Height of CTFramesetter
  • Next by Date: NSSplitview. Stopping the split moving
  • Previous by thread: Transparent content view of NSWindow clicks through
  • Next by thread: Core Text: Determining Line Height of CTFramesetter
  • Index(es):
    • Date
    • Thread