On Dec 18, 2014, at 12:57 AM, Jerry Krinock <je...@ieee.org> wrote: > On 2014 Dec 17, at 22:32, Ken Thomases <k...@codeweavers.com> wrote: > >> If you use a proper template image in a button whose showsStateBy includes >> NSChangeBackgroundCellMask, it will show a blue effect when the button's >> state is NSOnState. (You don't normally explicitly set the showsStateBy of >> a button's cell, although you certainly can. > > Ken, showStateBy, presuming it means “how to show the state”, sure seems like > it would be the trick I am missing. How do you do that?? If you know, you > are smarter than both Xcode’s documentation viewer and even Google, who just > told me: > > Your search - showStateBy site:developer.apple.com - did not match any > documents.
You dropped an "s". shows State By -> showsStateBy. https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSButtonCell_Class/#//apple_ref/occ/instm/NSButtonCell/showsStateBy But, as I said, it's better to just set the button type to one which has the relevant showsStateBy behavior, like NSToggleButton. https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSButton_Class/index.html#//apple_ref/occ/instm/NSButton/setButtonType: https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSButtonCell_Class/index.html#//apple_ref/doc/c_ref/NSToggleButton Regards, Ken _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com