• 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: Title bar highlighting behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Title bar highlighting behavior


  • Subject: Re: Title bar highlighting behavior
  • From: bryscomat <email@hidden>
  • Date: Sat, 15 Aug 2009 02:28:48 -0500

Works perfectly. Thanks.

On Aug 14, 2009, at 7:39 PM, Graham Cox wrote:


On 15/08/2009, at 9:40 AM, bryscomat wrote:

In a window of my app, I have an NSView acting as a toolbar. It is colored with a gradient so that it looks like a textured toolbar and blends in nicely with the title bar. However, it does not fade out when window loses key. I have implemented the delegate method windowDidResignKey: and am attempting to modify it that way. Does anybody have pointers on how to go about this?

In that method, just call -setNeedsDisplay:YES on your view.

In the view's -drawRect: method, detect whether the view's window is currently key, and draw the appropriate background.

To detect whether key, use:

if([self window] == [NSApp keyWindow])
{
	...

}


--Graham



_______________________________________________

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: 
 >Title bar highlighting behavior (From: bryscomat <email@hidden>)
 >Re: Title bar highlighting behavior (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Problem with Float type variable
  • Next by Date: Re: iPhone: detect if docked?
  • Previous by thread: Re: Title bar highlighting behavior
  • Next by thread: enterFullScreenMode and tearing
  • Index(es):
    • Date
    • Thread