O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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;

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required