Re: NSColor (alpha enabling and setting color in color panel)
Re: NSColor (alpha enabling and setting color in color panel)
- Subject: Re: NSColor (alpha enabling and setting color in color panel)
- From: Bruce Veazie <email@hidden>
- Date: Thu, 2 Jan 2003 00:57:34 -0500
You can set the color of both the colorwell (NSColorWell) and the
colorpanel (NSColorPanel) with "setColor:(NSColor *)colorToSet". Both
use the same method.
You can get the color of the selected text from [selectedText
textColor];
So:
[yourColorWellOrColorPanel setColor:[selectedText textColor]];
If the colorwell is active (the bezel is highlighted) and the
colorpanel is displayed, just set the color of the colorwell. The panel
will sync its color to it automatically.
Is that what you were looking for?
On Thursday, January 2, 2003, at 12:35 AM,
email@hidden wrote:
On Wednesday, January 1, 2003, at 05:25 PM, Aaron Boothello wrote:
1. How do you enable the Alpha value slider in the Color panel ?
From NSColorPanel.h:
- (void)setShowsAlpha:(BOOL)flag;
- (BOOL)showsAlpha;
2. How do you set the color of the colorwell/color panel ?
example: i select a different colored text in my document, with the
color panel open. i would like the color of the text to be selected in
the color panel.
Not sure on this one...
-Ken
Bruce J. Veazie
email@hidden
http://veazie.org
_______________________________________________
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.