• 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: Graham Cox <email@hidden>
  • Date: Sat, 15 Aug 2009 10:39:19 +1000


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


  • Follow-Ups:
    • Re: Title bar highlighting behavior
      • From: bryscomat <email@hidden>
References: 
 >Title bar highlighting behavior (From: bryscomat <email@hidden>)

  • Prev by Date: Re: Title Bar of Key Window
  • Next by Date: Re: Aqua animations drawing from separate thread
  • Previous by thread: Title bar highlighting behavior
  • Next by thread: Re: Title bar highlighting behavior
  • Index(es):
    • Date
    • Thread