Recommendations for Popup with MultiSelect?


#1

I am trying to create a Popup menu, which allows the user to select multiple items at once. The proble, with the JUCE Popup menu: it closes down, as soon as you select an item. But I want to create a Popup menu, which stays open after you selected one item and allows you to select additional items. Something like this:

19

Maybe some of you have done something similar? And can give hints on how to best implement such a feature? :slight_smile:


#2

Not exactly the same, but there is the MultiChoicePropertyComponent which we use to do something similar in the Projucer:


#3

Hi Ed,

Ah, did not know that multi-choice component. Cool. Thanks!

But just realized, that Popup menu might work after all.
I found out, there is an option to add a “PopupMenu::CustomComponent” as an item. And the good thing is: if you click on this custom component, the Popup menu does not disappear. In other words: you can implement your own mouses handling for that CustomComponent. And thereby I should be able to make a Popup menu, which allows multi-select.


#4

Just out of pure curiosity: and then, how does the user closes the pop-up once he has made all his desired changes?


#5

Well, he would simply click anywhere on the screen, where there is no popup menu.
That closes the popoup menu and applies any changes he made in the selection.