Multiple Selection nspopupbutton Mac OS X

Hallo, Is that possible? Best regards Andreas

I believe it is possible, but I think you can't do it via NSPopupButton's "selectItem" method (or equivalent), because (I think) that turns off all other menu items. However, IIRC you can do it by getting the associated menu via the NSPopupButton "menu" method and setting the menu item states directly.


Keep in mind that the Human Interface Guidelines recommend not doing this:

developer.apple.com/library/content/documentation/UserExperience/Conceptual/OSXHIGuidelines/ControlswithMenus.html


("Don’t use a pop-up menu when more than one simultaneous selection is appropriate.")


and it's a pretty lousy UI, because it's fiddly for the user to find out which items are actually selected.

Hi Quincey,


thanks for your post.


What I want to produce:


- There are 71 fairs from wich the user has to choose wich one(s) to take. A multiple choice is really important.


What is in your oppinion the best way to handle that?


Best regards.

Andreas

a popup menu with 71 items is not easy for users.


Why not using a tableview, with category headers ?

Hello,


yes this could be a solution, but I think a table with 71 rows is also not so useable.

Are there other ideas how to handle it?

I mean, on Websites there is often a dropdown in wich you can choose a multiple selection.

Can anybody help me to do this with NSPopupbutton? I have no idea.


Best regards and thanks for your help,

Andreas

Are you targetting IOS or OSX ?

Anyway, I do not see a way to have multiple selection in a standard NSPopupbutton : as soon as you select, it return.

So, you should have to subclass NSPopupbutton.

The other way is to mimic it ; just as the constraint editor does in IB : open a window in which you will have items to select and a validation button.

The trouble with a drop-down menu is that it's hard for the user to see the whole list at one time, so there's a lot of scrolling around. This gets worse because the popup button could be anywhere on the screen, which might limit the available height for the menu.


Apple's Human Interface Guidelines recommend using a menu-bar menu instead. That guarantees you have the full height of the screen, but with 71 items it's still going to be unpleasant for the user.


With 71 items, I think the best solution would be to use rows and columns, to make best use of the available screen space. For example, you could use a NSCollectionView (or UICollectionView, if iOS) in a popover. There might still be some scrolling, but it would be better than a popup menu.

Multiple Selection nspopupbutton Mac OS X
 
 
Q