• 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: Borderless NSWindow contentView problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Borderless NSWindow contentView problem


  • Subject: Re: Borderless NSWindow contentView problem
  • From: "John C. Randolph" <email@hidden>
  • Date: Wed, 9 Nov 2005 01:12:34 -0800


On Nov 8, 2005, at 5:27 PM, Ricky Sharp wrote:


On Nov 8, 2005, at 6:49 PM, Matt Ball wrote:

I am attempting to create a borderless window shaped like a rounded
rectangle. I modify the attributes of the window like so:

[code snipped]

However, this doesn't work. When I show my custom window, it is
completely transparent. I know that it exists because if I change the
window's background color from clearColor to redColor, I get a red
square. Additionally, I know that both my drawRect: and
drawRoundRectWithFrame: methods are getting called. Can someone please
tell me why this isn't working?

Compare your code to the following sample:

<http://developer.apple.com/samplecode/RoundTransparentWindow/ RoundTransparentWindow.html>

Not that there's a mistake in that sample. The CustomWindow doesn't actually make the CustomView instance its contentview. You end up with one extra NSView instance, which is the CustomWindow's contentview.


-jcr


John C. Randolph <email@hidden> (408) 914-0013 Roaming Cocoa Engineer, Available for your projects at great Expense and Inconvenience.



_______________________________________________
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: 
 >Borderless NSWindow contentView problem (From: Matt Ball <email@hidden>)
 >Re: Borderless NSWindow contentView problem (From: Ricky Sharp <email@hidden>)

  • Prev by Date: Re: Questiong on NSString sizeWithAttributes
  • Next by Date: "Continuous Spell checking" feature to NSTextField?
  • Previous by thread: Re: Borderless NSWindow contentView problem
  • Next by thread: Re: Borderless NSWindow contentView problem
  • Index(es):
    • Date
    • Thread