• 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: Changing the Text Color of an NSMenuItem in an NSPopUpButton?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing the Text Color of an NSMenuItem in an NSPopUpButton?


  • Subject: Re: Changing the Text Color of an NSMenuItem in an NSPopUpButton?
  • From: Richard Kendall Wolf <email@hidden>
  • Date: Fri, 17 May 2002 13:39:10 -0500

On Friday, May 17, 2002, at 01:07 AM, mmalcolm crawford wrote:

On Thursday, May 16, 2002, at 02:37 PM, email@hidden wrote:

what happens if you set the item title to an NSAttributedString? You can set the foreground and background colors of one, and that might give you what you need.

You can't do that, unfortunately, it seems the title has to be an NSString.
And NSMenuItems don't have NSMenuItemCells either, so you can't set it there either.

At first I was also flush with this possibility ... but then I read the documentation and (more or less) came to the same conclusions. Since I don't yet trust my understanding of Cocoa enough to judge, it is good to have this confirmed by others on this list.

Summary: You can't set the string, but you can set an icon for each item...

I have actually begun thinking along similar lines ... that if I can't change the text color, at least I can associate an icon with each item and -then- I can use whatever color I like.

Thank you all for your help!
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Changing the Text Color of an NSMenuItem in an NSPopUpButton? (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: Utility window architecture question
  • Next by Date: possible to programmatically hide dock icon?
  • Previous by thread: Re: Changing the Text Color of an NSMenuItem in an NSPopUpButton?
  • Next by thread: Customize toolbar item
  • Index(es):
    • Date
    • Thread