• 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
Images in NSPopupMenu items when binded to a NSArrayController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Images in NSPopupMenu items when binded to a NSArrayController


  • Subject: Images in NSPopupMenu items when binded to a NSArrayController
  • From: "Pierre Chatel" <email@hidden>
  • Date: Mon, 5 May 2008 18:03:28 +0200

Hi List,

I need to populate a an NSPopupMenu with items having both a title and an
image attached.
This NSPopupMenu is binded, via InterfaceBuilder, to an NSArrayController
managing instances having both a "title" (NSString *) and "image" (NSImage
*) property.

Problem is, there is only one "Content Value" binding available on the
NSPopupMenu, so I bound it to arrangedItems.title and thus, no images in the
popup menu :/

I thought there was hope binding "Content Value" to an NSAttributedString
property (containing both the image and the title) but it seems it only
accepts NSStrings !

So, what do you think is the best option for me to populate an NSPopupButton
with text and images while still using cocoa bindings ?
(I tried setting the NSArrayController as a delegate to the NSMenu
underlying the NSPopupButton but it wasn't working very well).

Thanks !

Pierre CHATEL.
_______________________________________________

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: Images in NSPopupMenu items when binded to a NSArrayController
      • From: "Hamish Allan" <email@hidden>
  • Prev by Date: Re: Trouble using NSMatrix with radiobuttons and using NSPopUp buttons
  • Next by Date: Re: Updating NSTextView when it gets shorter [SOLVED]
  • Previous by thread: Re: ScreenSaver.framework only 32-bit?
  • Next by thread: Re: Images in NSPopupMenu items when binded to a NSArrayController
  • Index(es):
    • Date
    • Thread