
Can we have a NSComboBox with multiple selection through checkboxes in OSx. Please find the attached image as an example.
Please help.
According to the NSComboBox class reference - the answer is NO.
as you can see on the Manipulating the Selection:
@property(readonly) NSInteger indexOfSelectedItem
@property(readonly, strong) id objectValueOfSelectedItem
- deselectItemAtIndex:
- selectItemAtIndex:
- selectItemWithObjectValue:
they refer to the selected item as single selection.
so I'd suggest looking for a custom solution, like keeping the selections on a different array and binding it together.
NSPopUpButtonconfigured in pull-down mode and, as the user picks item, you adjust its title to reflect what's selected. - Ken Thomasesstateof the menu items so they show a check mark. - Ken Thomases