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

NSComboBox — Mac OS X 10.0

Synopsis

This class provides a combo box interface control to let the user enter a value into the text-field portion of the combo box, or select a value from a pop-up list.

image with no caption

@interface NSComboBox : NSTextField
                                  // Initializers
   - (id)initWithCoder:(NSCoder *)coder;
                                  // Accessor Methods
   - (void)setNumberOfVisibleItems:(int)visibleItems;
   - (int)numberOfVisibleItems;
   - (void)setHasVerticalScroller:(BOOL)flag;
   - (BOOL)hasVerticalScroller;
   - (void)setCompletes:(BOOL)completes;
   - (BOOL)completes;
   - (void)setIntercellSpacing:(NSSize)aSize;
   - (NSSize)intercellSpacing;
   - (void)setItemHeight:(float)itemHeight;
   - (float)itemHeight;
   - (void)setUsesDataSource:(BOOL)flag;
   - (BOOL)usesDataSource;
   - (void)setDataSource:(id)aSource;
   - (id)dataSource;
                                  // Instance Methods
   - (void)deselectItemAtIndex:(int)index;
   - (void)encodeWithCoder:(NSCoder *)coder;
   - (int)indexOfItemWithObjectValue:(id)object;
   - (void)addItemWithObjectValue:(id)object;
   - (void)addItemsWithObjectValues:(NSArray *)objects;
   - (int)indexOfSelectedItem;
   - (void)insertItemWithObjectValue:(id)object 
                                 atIndex:(int)index;
   - (id)itemObjectValueAtIndex:(int)index;
   - (void)noteNumberOfItemsChanged;
   - (int)numberOfItems;
   - (id)objectValueOfSelectedItem;
   - (NSArray *)objectValues;
   - (void)reloadData;
   - (void)removeAllItems;
   - (void)removeItemAtIndex ...

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