Instance Method

synchronizeTitleAndSelectedItem

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

Declaration

- (void)synchronizeTitleAndSelectedItem;

Discussion

If no item is currently selected, this method synchronizes the pop-up buttons displayed item with the first menu item. If the pop-up button cell does not get its displayed item from a menu item, this method does nothing.

For pull-down menus, this method sets the displayed item to the title first menu item.

If the pop-up button’s menu does not contain any menu items, this method sets the pop-up button’s displayed item to nil, resulting in nothing being displayed in the control.

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.

- selectItemWithTitle:

Selects the item with the specified title.

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