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

NSButton — Mac OS X 10.0

Synopsis

This NSControl subclass represents a button control in the user interface. A button works by sending out an action message whenever a mouse-down and mouse-up event occurs within the button area. The associated NSCell subclass for NSButton is NSButtonCell, described next.

image with no caption

@interface NSButton : NSControl
                                  // Accessor Methods
   - (void)setImagePosition:(NSCellImagePosition)aPosition;
   - (NSCellImagePosition)imagePosition;
   - (void)setTitle:(NSString *)aString;
   - (NSString *)title;
   - (void)setAlternateTitle:(NSString *)aString;
   - (NSString *)alternateTitle;
   - (void)setKeyEquivalentModifierMask:(unsigned int)mask;
   - (unsigned int)keyEquivalentModifierMask;
   - (void)setImage:(NSImage *)image;
   - (NSImage *)image;
   - (void)setAlternateImage:(NSImage *)image;
   - (NSImage *)alternateImage;
   - (void)setKeyEquivalent:(NSString *)charCode;
   - (NSString *)keyEquivalent;
   - (void)setAttributedTitle:(NSAttributedString *)aString;
   - (NSAttributedString *)attributedTitle;
   - (void)setAllowsMixedState:(BOOL)flag;
   - (BOOL)allowsMixedState;
   - (void)setAttributedAlternateTitle:(NSAttributedString *)obj;
   - (NSAttributedString *)attributedAlternateTitle;
   - (void)setBordered:(BOOL)flag;
   - (void)setSound:(NSSound *)aSound;
   - (NSSound *)sound;
   - (void)setPeriodicDelay:(float)delay 
                                 interval:(float)interval;
   - (void)setTransparent ...

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