Inherits from | |
Conforms to | |
Framework | /System/Library/Frameworks/AppKit.framework |
Availability | Available in Mac OS X v10.0 and later. |
Companion guide | |
Declared in | NSColorWell.h |
Related sample code |
An NSColorWell
object is an NSControl
for selecting and displaying a single color value. An example of an NSColorWell
object (or simply color well) is found in an NSColorPanel
, which uses a color well to display the current color selection. A color well is available from the Palettes panel of Interface Builder.
Activates the receiver, displays the color panel, and makes the current color the same as its own.
- (void)activate:(BOOL)exclusive
YES
to deactivate any other color wells; NO
to keep them active. If a color panel is active with exclusive set to YES
and another is subsequently activated with exclusive set to NO
, the exclusive setting of the first panel is ignored.
This method redraws the receiver. An active color well will have its color updated when the current color of the NSColorPanel
changes. Any color well that shows its border highlights the border when it’s active.
NSColorWell.h
Returns the color of the receiver.
- (NSColor *)color
The color of the receiver.
NSColorWell.h
Deactivates the receiver and redraws it.
- (void)deactivate
NSColorWell.h
Draws the colored area inside the receiver at the specified location without drawing borders.
- (void)drawWellInside:(NSRect)insideRect
The rectangle specifying the area within which to draw.
NSColorWell.h
Returns a Boolean value indicating whether the receiver is active.
- (BOOL)isActive
YES
if the receiver is active, NO
otherwise.
NSColorWell.h
Returns a Boolean value indicating whether the receiver has a border.
- (BOOL)isBordered
YES
if the receiver is bordered, NO
otherwise.
NSColorWell.h
Places or removes a border on the receiver and redraws the receiver.
- (void)setBordered:(BOOL)bordered
NSColorWell.h
Sets the color of the receiver and redraws the receiver.
- (void)setColor:(NSColor *)color
The new color for the color well.
NSColorWell.h
Changes the color of the receiver to that of the specified object.
- (void)takeColorFrom:(id)sender
The object from which to take the new color.
NSColorWell.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-02-28)