commit 62fd0918c6f2dbb11826a5236f4992f8b44f0f6d parent d408d0cb19ed920515e419131323c33719c8e5a1 Author: dsp56300 <dsp56300@users.noreply.github.com> Date: Thu, 24 Mar 2022 23:48:44 +0100 use multiple columns for very long combo boxes Diffstat:
M | source/jucePlugin/VirusParameterBinding.cpp | | | 8 | ++++++++ |
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/source/jucePlugin/VirusParameterBinding.cpp b/source/jucePlugin/VirusParameterBinding.cpp @@ -106,9 +106,17 @@ void VirusParameterBinding::bind(juce::ComboBox& _combo, const Virus::ParameterT _combo.clear(); int idx = 1; + uint32_t count = 0; for (const auto& vs : v->getAllValueStrings()) { if(vs.isNotEmpty()) + { _combo.addItem(vs, idx); + if(++count == 16) + { + _combo.getRootMenu()->addColumnBreak(); + count = 0; + } + } idx++; } //_combo.addItemList(v->getAllValueStrings(), 1);