Inherits From:
NSControl : NSView : NSResponder : NSObject
Conforms To:
NSCoding (NSResponder)
NSObject (NSObject)
Declared In:
AppKit/NSColorWell.h
An application can have one or more active color wells. You can activate multiple color wells by invoking the activate:
method with NO as its argument. When a mouse-down event occurs on a color well's border, it becomes the only active color well. When a color well becomes active, it brings up the color panel also.
The mouseDown:
method enables a color well to send its color to another color well or any other subclass of NSView that implements the NSDraggingDestination protocol.
activate:
(BOOL)exclusive
Activates the NSColorWell, displays the Color panel, and makes the NSColorPanel's current color the same as its own. If exclusive is YES, deactivates any other color wells; if NO, keeps them active. Redraws the receiver. An active color well will have its color updated when the NSColorPanel's current color changes. Any color well that shows its border highlights the border when it's active.
See also:
- deactivate
, - isActive
color
Returns the color of the NSColorWell.
See also:
- setColor:
, - takeColorFrom:
deactivate
Deactivates the NSColorWell and redraws it.
See also:
- activate:
, - isActive
drawWellInside:
(NSRect)insideRect
Draws the colored area inside the NSColorWell at the location specified by insideRect without drawing borders.
isActive
Indicates whether the NSColorWell is active.
isBordered
Indicates whether the NSColorWell is bordered.
See also:
- setBordered:
setBordered:
(BOOL)bordered
Places or removes a border on the NSColorWell, depending on bordered, and redraws the receiver.
See also:
- isBordered
setColor:
(NSColor *)color
Sets the color of the NSColorWell to color and redraws the receiver.
See also:
- color
, - takeColorFrom:
takeColorFrom:
(id)sender
Changes the color of the NSColorWell to that of sender.
See also:
- color
, - setColor: