• 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: Custom Title bars
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Title bars


  • Subject: Re: Custom Title bars
  • From: glenn andreas <email@hidden>
  • Date: Thu, 25 Aug 2005 11:16:49 -0500


On Aug 25, 2005, at 11:02 AM, Ryan Stevens wrote:

On Aug 25, 2005, at 8:36 AM, Jason Swain wrote:


On 25 Aug 2005, at 15:55, Louis Sinclair wrote:



Hi all,

How would one go about making a custom title bar on a window. All I really need to do is apply a backdrop image to the title bar area.

You may need to draw the window yourself. Start with a transparent window and fill in what you need. This may be a hassle as you will need to do your own close buttons etc, but it may work for you.

Have a look at this:

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


No, don't draw the window yourself - too much work to get anything close to the standard. Instead you can grab a standardWindowButton (see NSWindow docs) and go from there.





Unfortunately, this doesn't allow for making a custom title bar background - it makes it relatively easy to tweak the standard buttons (though this does cause some problems if you're not careful - those buttons weren't designed to be messed with much - for example, if you remove them, there will be "holes" left in the mouse tracking region that expects them to be there).

You could, certainly, use standardWindowbutton:forStyleMask: if you wanted to make your own window (as originally suggested) and then use this to populate the standard buttons in the new custom window.

If the format of the window title bar view hierarchy were documented, you might be able to traverse it and modify it accordingly (starting from those buttons and walking up and "over"), but it's not (and relying on undocumented behavior is always a good way to make you rewrite your app for every OS X version).



Glenn Andreas                      email@hidden
 <http://www.gandreas.com/> wicked fun!
Widgetarium | the quickest path to widgets

_______________________________________________
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: 
 >Custom Title bars (From: Louis Sinclair <email@hidden>)
 >Re: Custom Title bars (From: Jason Swain <email@hidden>)
 >Re: Custom Title bars (From: Ryan Stevens <email@hidden>)

  • Prev by Date: Re: AddressBook and CoreData
  • Next by Date: RE: Manipulating compound file on Mac?
  • Previous by thread: Re: Custom Title bars
  • Next by thread: Re: Custom Title bars
  • Index(es):
    • Date
    • Thread