Re: NSColorWell - controlling opacity
Re: NSColorWell - controlling opacity
- Subject: Re: NSColorWell - controlling opacity
- From: Fritz Anderson <email@hidden>
- Date: Sat, 25 Feb 2012 11:25:01 -0600
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 (email@hidden)
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:
This email sent to email@hidden