• 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
Custom NSMenuItem/NSPopupButtonCell Drawing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom NSMenuItem/NSPopupButtonCell Drawing


  • Subject: Custom NSMenuItem/NSPopupButtonCell Drawing
  • From: Mike Rossetti <email@hidden>
  • Date: Mon, 16 Jul 2007 15:51:01 -0600

Hello All,

I have a need to do some custom drawing within a menu item of a NSPopUpButtonCell. Essentially, within the menu item I need to draw the title to the left (like normal) and then a tagword to the right in red and in a bit smaller font. For example:

	My Item Title         LATE

where 'LATE' is drawn in red and right justified in the cell.

This is fairly straightforward to do for the quiescent state of the popup: just override drawWithFrame and render a couple of attributed strings.

But I'm having a dickens's of a time figuring out how to get what I want when the popup is popped up! There doesn't appear to be a convenient rendering function that I can override that renders the menu item while being popped up.

Surely I am missing something obvious here.  Any suggestions?

Thanks,
Mike

_______________________________________________

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: Custom NSMenuItem/NSPopupButtonCell Drawing
      • From: Murat Konar <email@hidden>
  • Prev by Date: NYC Cocoaheads meeting
  • Next by Date: Re: Custom NSMenuItem/NSPopupButtonCell Drawing
  • Previous by thread: NYC Cocoaheads meeting
  • Next by thread: Re: Custom NSMenuItem/NSPopupButtonCell Drawing
  • Index(es):
    • Date
    • Thread