On 26 Dec 2013, at 18:49, Peter Teeson <ptee...@icloud.com> wrote:
>    _Cancel = [[NSButton alloc]init];
>    [_Cancel setFrame:theButtonFrame];
>    [_Cancel setNeedsDisplay:YES];

Several issues here:

1) Control tints only apply to window widgets, focus borders, token capsules 
and to Aqua UI. MacOS X 10.7 removed the last aqua buttons and replaced them 
with grey, tint-less buttons. So whatever tint you set, you won’t see it 
anymore these days. Those grey, tint-less buttons look very similar to some 
other button types these days.

2) When you create a new NSButton, it is by default set up to look like a 
NeXT-style button. You need to set its bezel to NSRoundedBezelStyle to get a 
Mac-style button. NeXT-style buttons don’t honour the tint either. So the code 
you posted isnot identical to the button you create in IB. Hence, even if 
you’re running on 10.6 or earlier where buttons still show the tint, it’s not 
surprising that your button looks different.

3) As others mentioned, buttons are usually set to “default”. To find out what 
that corresponds to, look at NSColor’s currentControlTint method.

Cheers,
-- Uli Kusterer
“The Witnesses of TeachText are everywhere...”
http://zathras.de


_______________________________________________

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