• 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: NSMenuItem attributed title size discrepancy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMenuItem attributed title size discrepancy


  • Subject: Re: NSMenuItem attributed title size discrepancy
  • From: Matt Neuburg <email@hidden>
  • Date: Fri, 15 Jul 2005 10:43:15 -0700

On Tue, 12 Jul 2005 23:14:05 -0400, Matt Emerson <email@hidden>
said:
>I have a regular-sized NSPopUpButton, one of whose menu item titles
>is an
>attributed title.  (The attributed title is H2O, but the 2 is smaller
>and has a lowered baseline.  I entered the attributed title in IB.)
>
>When the menu pops up, it appears that the non-attributed menu item
>titles are drawn at a slightly larger size.  The attributed title
>is drawn at the same size as displayed in the NSPopUpButton.  The
>size difference is noticeable, and looks bad.
>
>The small-sized pop up buttons don't exhibit this behavior.
>
>Is there something that I am doing incorrectly, or could this
>be a bug?

It's possibly a variety of the same bug I complained about here:

http://www.cocoabuilder.com/archive/message/cocoa/2005/2/9/127860

The problem is that the system lies to you about what the menu font size is,
so you can never use an attributed string to make a menu using the same size
font (because you don't know what it is). The only solution I've been able
to find is this: if you make one menu item an attributed string, you must
make them *all* attributed strings, so you have control. m.

--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>



 _______________________________________________
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

  • Prev by Date: Re: Font control in TextView, TextStorage?
  • Next by Date: Re: Path of a folder represented in AppleScript path style
  • Previous by thread: Re: NSMenuItem attributed title size discrepancy
  • Next by thread: Trying to bind to NSTreeController
  • Index(es):
    • Date
    • Thread