Instance Property

selectedItem

The menu item that was last selected by the user.

Declaration

@property(readonly, strong) NSMenuItem *selectedItem;

Discussion

The last selected menu item is the one that was highlighted when the user released the mouse button. It is possible for a pull-down menu’s selected item to be its first item. If no item is selected, the value in this property is nil.

See Also

Getting the user’s selection

titleOfSelectedItem

The title of the item that was last selected by the user.

indexOfSelectedItem

The index of the item that was last selected by the user.

- objectValue

Returns the index of the selected item.

selectedTag

The tag of the menu item that was last selected by the user.