• 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: See-through custom NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: See-through custom NSView


  • Subject: Re: See-through custom NSView
  • From: Pascal Pochet <email@hidden>
  • Date: Wed, 19 Jul 2006 16:33:59 +0200

Put the custom view in a NSClipView and

	[_clipView setDrawsBackground:YES]	;
	[_clipView setBackgroundColor:[NSColor clearColor]]	;

…assuming you added an outlet on the NSClipView…
(tested here…)


Pascal Pochet email@hidden




Le 19-juil.-06 à 16:10, Michael Lutz a écrit :

[Message edited, because the attached project was to large for the list]

Hello Stephane,

this won't do the trick. Thanks for the suggestion anyway. ClearColor sounded good to me until I tried it ;-).

I probably wasn't clear enough on what I want to achieve. Therefore I compiled a little sample project. The result looks like this:
http://www.tv-apathy.de/samplecode/clearview.png


The top view is a NSTextview, and as you can see, it is transparent (you can see XCode behind it). The bottom view is my custom view (ViewDock) which I can't get this transparent as the NSTextView. If you (anybody) likes to give it a try, please take a look at the project. You may download it from here: http://www.tv-apathy.de/ samplecode/ClearView.zip

Cheers,
  Michael

On 19.07.2006, at 15:00, Stephane wrote:

Use the clearColor.

On Jul 19, 2006, at 2:30 PM, Michael Lutz wrote:

http://developer.apple.com/samplecode/RoundTransparentWindow/ index.html

-jcr


Hi John,

thanks for the hint, I know that example. Unfortunately that's not what I want: It uses a complete transparent window (setting the alpha of the whole window). I only want the area which my view covers to be transparent (like a whole in the window so to speak). This can be achieved using a NSTextView, bat I can't accomplish it using a custom (NSView derived) view.




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com


This email sent to email@hidden



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: See-through custom NSView (From: Michael Lutz <email@hidden>)

  • Prev by Date: PDEPrint Plugin
  • Next by Date: Re: See-through custom NSView
  • Previous by thread: Re: See-through custom NSView
  • Next by thread: Re: See-through custom NSView
  • Index(es):
    • Date
    • Thread