NSComboBox

NSComboBox Mac OS X 10.0

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.

figs/cocn_1521.gif

@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:(int)index;
   - (void)removeItemWithObjectValue:(id)object;
   - (void)scrollItemAtIndexToTop:(int)index;
   - (void)scrollItemAtIndexToVisible:(int)index;
   - (void)selectItemAtIndex:(int)index;
   - (void)selectItemWithObjectValue:(id)object;
// Methods Implemented by the Delegate
   - (void)comboBoxSelectionDidChange:(NSNotification *)notification;
   - (void)comboBoxSelectionIsChanging:(NSNotification *)notification;
   - (void)comboBoxWillDismiss:(NSNotification *)notification;
   - (void)comboBoxWillPopUp:(NSNotification *)notification;



    Part II: API Quick Reference
    Chapter 13. Foundation Classes