| 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.hReturns the color of the receiver.
- (NSColor *)color
The color of the receiver.
NSColorWell.hDeactivates the receiver and redraws it.
- (void)deactivate
NSColorWell.hDraws 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.hReturns a Boolean value indicating whether the receiver is active.
- (BOOL)isActive
NSColorWell.hReturns a Boolean value indicating whether the receiver has a border.
- (BOOL)isBordered
NSColorWell.hPlaces or removes a border on the receiver and redraws the receiver.
- (void)setBordered:(BOOL)bordered
NSColorWell.hSets the color of the receiver and redraws the receiver.
- (void)setColor:(NSColor *)color
The new color for the color well.
NSColorWell.hChanges 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.hLast updated: 2007-02-28