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 ...

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.