There's no supported way to do it and never has been; back in the day when Java's compatibility test had a "set button color", the MacLookAndFeel got an exemption because it's just not possible.
If you look in the Calendar app bundle it has grayscale checkbox images, which they probably colorize with code specific to Calendar - so even Apple is "using images to mimic the UI" - and since it's specific to the OS it ships with, it doesn't have to worry about mismatches if it runs on a different one. ----- Original Message ----- From: "Alex Kac" <a...@webis.net> To: "SevenBits" <sevenbitst...@gmail.com> Cc: "Cocoa-Dev" <Cocoa-dev@lists.apple.com> Sent: Thursday, June 5, 2014 10:42:48 PM Subject: Re: Simple question? NSButton/checkbox color OK maybe I’m not being clear. We need to have a checkbox that can be colored, exactly the same way that the Calendar app on both color their checkboxes for the calendar they are representing. Right now the only way I can think of doing that is to create a checkbox image, and color it, and use that. Obviously if we do that, we have to have different images for Mavericks and Yosemite. So we have to mimic Yosemite. I’d prefer NOT to have to create mimicked checkbox images. That’s what I’m trying to prevent. I’m asking all the AppKit gurus here if there is a better way, a more proper way, to color a checkbox control without having to use images to mimic the UI of the OS we’re running on. On Jun 5, 2014, at 6:38 PM, SevenBits <sevenbitst...@gmail.com> wrote: > On Jun 5, 2014, at 8:32 PM, Alex Kac <a...@webis.net> wrote: > >> I’m still learning AppKit after many years on iOS :) >> >> Given an NSButton based checkbox…what’s the best way to get a colored check? >> I think we’re just going to have to use a custom image that we create - >> which is fine just annoying as we’ll also have to match Yosemite - but if >> there is a better way, I’m all for it. > > Why mimic Yosemite? Just use the pre-Yosemite look on < 10.10, and the > Yosemite theme on >= 10.10. > > It’ll be great to have this new interface be implemented as an NSAppearance, > so our apps that use custom drawing can fall back on a legacy appearance if > the Yosemite look is not supported yet. Anyone know how this new-UI issue > will be handled? Without breaking NDA, could someone indicate if this is like > iOS 7, where the interface you get depends on the toolkit you link against. > Alex Kac - President and Founder Web Information Solutions, Inc. “Don't forget until too late that the business of life is not business but living.” -- B.C. Forbes, _______________________________________________ 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://urldefense.proofpoint.com/v1/url?u=https://lists.apple.com/mailman/options/cocoa-dev/lrucker%2540vmware.com&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=yJFJhaNnTZDfFSSz1U9TSNMmxGyib3KjZGuKfIhHLxA%3D%0A&m=DShi9mvJqH2rPq9TzcpBlepgV0kKVHzLB5ubcAwsMow%3D%0A&s=4b6656ae3389e22b2997323ad779cf16443c5361290c42a0ad26132f4ccd6b5f This email sent to lruc...@vmware.com _______________________________________________ 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