Instance Method

selectItemWithTitle:

Selects the item with the specified title.

Declaration

- (void)selectItemWithTitle:(NSString *)title;

Parameters

title

The title of the item to select. If you specify an empty string, or a string that does not match the title of a menu item, this method deselects the currently selected item.

Discussion

By default, selecting or deselecting a menu item changes its state. To disassociate the current selection from the state of menu items, set the altersStateOfSelectedItem property to NO.

See Also

Dealing with selection

- selectItem:

Selects the specified menu item.

- selectItemAtIndex:

Selects the item in the menu at the specified index.

- selectItemWithTag:

Selects the menu item with the specified tag.

- setTitle:

Sets the string displayed in the receiver when the user isn’t pressing the mouse button.

selectedItem

The menu item last selected by the user.

indexOfSelectedItem

The index of the item last selected by the user.

- synchronizeTitleAndSelectedItem

Synchronizes the pop-up button’s displayed item with the currently selected menu item.