Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Proper way to use images in NSMenuItem?

Tags:

cocoa

I've put some images next to NSMenuItems using the image option in Interface Builder. The custom image is a simple PNG. I was hoping the system would automatically alter the color of the image during mouse over like it does with stock images. It does not. What am i doing wrong?

Here's a pic of a stock image vs my custom one:

compare

like image 359
Arlen Anderson Avatar asked Jan 04 '12 05:01

Arlen Anderson


1 Answers

In code, call [menuItem.offStateImage setTemplate:YES]

like image 142
Francis McGrew Avatar answered Nov 05 '22 11:11

Francis McGrew