On 25 Feb 2012, at 7:10 AM, Graham Cox wrote:

> I was surprised to find I couldn't set whether the color panel displayed the 
> opacity slider depending on which colour well was selected. Can anyone think 
> of a way I could achieve that? Seems to me that the color well/color panel 
> communication is a totally closed book - I've already got various workarounds 
> to overcome other issues with this communication, but with this one it's 
> looking like I'm going to have to throw out NSColorWell and just do it myself 
> from scratch. I thought frameworks were supposed to help, not hinder?

What I'd try next would be to subclass NSColorWell and override -activate: and 
-deactivate, and send the shared color panel -setShowsAlpha: accordingly.

If you have a lot of wells, that may be a lot of work. It might reduce the work 
if your subclass had a property controlling whether to ask for the alpha 
slider, and use User Defined Runtime Attributes (Identity inspector) to set it 
at load time.

        — F


_______________________________________________

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