Domanda

I'm using an NSPopupButton in my OS X app to present the user with a list of choices. I'm populating it like this:

[baudButton removeAllItems];
[baudButton addItemWithTitle:(@"Baud")];
[baudButton addItemWithTitle:(@"600")];
[baudButton addItemWithTitle:(@"1200")];
[baudButton addItemWithTitle:(@"2400")];

Is there a way to visually mark the selection, or should I use another control?

È stato utile?

Soluzione

Setting the NSPopUpButton's type attribute to "Popup" gave me a checkmark on the selected item, and displays the item on the "closed" button.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top