I’m sure I’m missing something simple. Reading the docs, reading some 
stack-overflow comments, and a few posts on this list from years ago, it seems 
like I am missing something.

I have an NSButton with an image. I’d like to have the button look etched when 
unselected - and tinted blue when selected just like the Xcode mini-tabbar here:
https://www.dropbox.com/s/b1f9kxe5ww25ep7/Screenshot%202014-06-24%2016.24.55.png

I’m doing this in code, not in IB. I’m using an NSButton subclass:
                [self setButtonType: NSToggleButton];
                [self setBordered: NO];
                [self setTitle: @""];
                [self.cell setImageScaling: NSImageScaleProportionallyDown];
                self.bezelStyle = NSShadowlessSquareBezelStyle;
                self.focusRingType = NSFocusRingTypeNone;


And on the image, we’re setting the setTemplate:YES property on it. 
        [iconImage setTemplate:YES];

According to several posts on this list, a bezel-less NSButton that’s a toggle 
button, should give me what I’m looking for, but its not. The obvious other 
option is to just create an alternate image…which I’m not against, but it just 
seems like it would be better to use a built-in system if one exists - or does 
one?

_______________________________________________

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

Reply via email to