Re: Custom NSMenuItem/NSPopupButtonCell Drawing
Re: Custom NSMenuItem/NSPopupButtonCell Drawing
- Subject: Re: Custom NSMenuItem/NSPopupButtonCell Drawing
- From: Murat Konar <email@hidden>
- Date: Mon, 16 Jul 2007 14:57:56 -0700
-[NSMenuItem setAttributedTitle:]
On Jul 16, 2007, at 2:51 PM, Mike Rossetti wrote:
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
_______________________________________________
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