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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to