• 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
How to get window title bar font ^size^ ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to get window title bar font ^size^ ?


  • Subject: How to get window title bar font ^size^ ?
  • From: Jerry Krinock <email@hidden>
  • Date: Sat, 24 Nov 2007 22:21:57 -0800

NSFont provides:

+ (NSFont *)titleBarFontOfSize:(float)fontSize

Just what I need to get the font used in window title bars! But, uhhh, what do I give for the fontSize argument? I know it looks like about 13, but how do I get a "correct, supported, future-proof" answer?

(The reason why I'm doing this is to place a little icon to the left of the title, so I need to know how big it is. With lots of code, I've gotten it all to work...handling resizing was really fun. But I have to hard-code that stupid font size.)

When I log the subviews of the window, I get the red button, the yellow button, the green button and the main contentView. I was hoping to get some kind of text "view" that would be the window title, but apparently it's not a "view".

Thanks for any tips,

Jerry Krinock
_______________________________________________

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: How to get window title bar font ^size^ ?
      • From: "Philip Q" <email@hidden>
    • Re: How to get window title bar font ^size^ ?
      • From: Andrew Farmer <email@hidden>
  • Prev by Date: Preference pane deployment
  • Next by Date: Re: How to get window title bar font ^size^ ?
  • Previous by thread: Re: Preference pane deployment
  • Next by thread: Re: How to get window title bar font ^size^ ?
  • Index(es):
    • Date
    • Thread