On Jun 14, 2011, at 6:33 AM, Adil Saleem wrote:

> I want to add a button in front of Label in every NSMenuItem entry. Is using 
> a custom view the only option or does Cocoa provide some other option as well 
> ?

You’ll need a custom view. This is pretty nonstandard UI, so I hope your 
designers know what they’re doing :)

> And if custom view is the way, then how can we detect that button was pressed 
> in which menu item? Because the selector called on press of button will be 
> for button (not menu item), so how can we detect which NSMenuItem was 
> involved in the button click ?

Set a custom tag on the button, or look at the button’s superview.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list ([email protected])

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