Name

NSColorWell — Mac OS X 10.0

Synopsis

This NSControl subclass provides a user interface element that the user can use to open the color picker and select colors the application can use. This NSControl subclass has no associated NSCell subclass, so NSColorWell controls may not appear in NSMatrix objects, which require NSCell objects as its children. To obtain an NSColor object from the color well, use the method color; to set the color displayed in the well, invoke setColor:.

image with no caption

@interface NSColorWell : NSControl
                                  // Accessor Methods
   - (void)setBordered:(BOOL)flag;
   - (void)setColor:(NSColor *)color;
   - (NSColor *)color;
                                  // Instance Methods
   - (void)activate:(BOOL)exclusive;
   - (void)deactivate;
   - (void)drawWellInside:(NSRect)insideRect;
   - (BOOL)isActive;
   - (BOOL)isBordered;
   - (void)takeColorFrom:(id)sender;

Get Cocoa in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.