Re: NSColorWell and alpha values
Re: NSColorWell and alpha values
- Subject: Re: NSColorWell and alpha values
- From: Jérome Foucher <email@hidden>
- Date: Mon, 1 Dec 2003 11:22:00 +0100
On 1 dic. 03, at 10:44, p3consulting wrote:
On 1 dic. 2003, at 09:53, Jirome Foucher wrote:
Hi all,
I'm trying to use NSColorWell to display a color with an alpha value.
When I set the color using [colorWell setColor:myColorWithAlphaValue]
that works fine. Then control clearly shows the alpha value.
But as soon as I click in the control, the alpha value is ignored
(the color well redraws the color without its alpha value), and
moreover, the color picker that appears does not have any slider to
set the alpha value.
I don't see any method in NSColorWell to specifiy if I want the color
picker to offer an alpha value slider.
What am I doing wrong here ?
Do I have to show the color panel myself ? If so how do I do ?
Both
[[NSColorPanel sharedColorPanel] setShowsAlpha:YES]
and
[NSColor setIgnoresAlpha:NO] (class method !)
have to be called.
Ok. That works. Thanks.
But what if I want the alpha value slider to appear on a per-button
basis ?
I have several buttons in my GUI where the color must not include an
alpha value, and some buttons which can accept an alpha value...
Jerome
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.