# Horrible ComboBox

**URL:** <https://forum.juce.com/t/horrible-combobox/53529>\
**Category:** Android\
**Created:** [October 26, 2022, 5:55pm UTC](https://forum.juce.com/t/horrible-combobox/53529 "2022-10-26T17:55:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaveAE](https://avatars.discourse-cdn.com/v4/letter/d/b77776/32.png) [@DaveAE](https://forum.juce.com/u/DaveAE)\
**Post date:** [October 26, 2022, 5:55pm UTC](https://forum.juce.com/t/horrible-combobox/53529/1 "2022-10-26T17:55:49Z")

</div>

JUCE 6.1.6 Android/iOS

Show a ComboBox with many items on a smaller display (Android or iOS in landscape for example). Now click on one of the last items and re-open the combobox. The popup menu now shows an alien (to the platform) up arrow and you cannot scroll the list in a normal fashion. You have to press an item an drag it up to scroll up which all feels very unnatural. Any solutions to this or a way to open a custom dialog instead on the ComboBox press?

---

<div class="post-metadata">

**Author:** ![adamwilson](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/adamwilson/32/1387_2.png) [@adamwilson](https://forum.juce.com/u/adamwilson)\
**Post date:** [October 27, 2022, 9:05am UTC](https://forum.juce.com/t/horrible-combobox/53529/2 "2022-10-27T09:05:12Z")

</div>

This is one of the reasons that for anything past a simple one page or synth-type GUI, I typically recommend using native UI or mixed JUCE + native.

There might be a way to make it look and feel more mobile native but it is a fiddly process with usually sub-optimal results.

---

<div class="post-metadata">

**Author:** ![aamf](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/aamf/32/19941_2.png) [@aamf](https://forum.juce.com/u/aamf)\
**Post date:** [October 27, 2022, 9:13pm UTC](https://forum.juce.com/t/horrible-combobox/53529/3 "2022-10-27T21:13:41Z")

</div>

On mobile devices the ComboBox is only useful if you have just a few items. It’s indeed quite horrible otherwise.

You could replace the ComboBox with a TextButton which then opens a PopupMenu. Look at the method `showMenuAsync()` for this. You have options to set the position of the menu, it’s size, which items are visible, etc. You can’t control everything but that might already be enough.

This is also a great improvement (I really don’t understand why it hasn’t been implemented): [Improving PopupMenu for touch screens](https://forum.juce.com/t/improving-popupmenu-for-touch-screens/37784)

Anternatively you could have the TextButton open a custom component. I made my own “menu within a window” using a ViewPort and a TreeView. It can be scrolled by dragging and sub-menus can be easily expanded and closed. It required modifying the JUCE codebase here and there but I’m very happy with the result. In fact, I think its considerably nicer than anything I could have done using the native UIs.

---

<div class="post-metadata">

**Author:** ![DaveAE](https://avatars.discourse-cdn.com/v4/letter/d/b77776/32.png) [@DaveAE](https://forum.juce.com/u/DaveAE)\
**Post date:** [October 28, 2022, 9:08am UTC](https://forum.juce.com/t/horrible-combobox/53529/4 "2022-10-28T09:08:26Z")

</div>

Well, for a library that is intended for cross-platform use, no native code should be necessary for basic controls. Anyway, I ended up overriding showPopup() and opening my own custom Component showing a basic list view (I don’t need submenu’s which makes things easier).

---

<div class="post-metadata">

**Author:** ![adamwilson](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/adamwilson/32/1387_2.png) [@adamwilson](https://forum.juce.com/u/adamwilson)\
**Post date:** [October 28, 2022, 10:54pm UTC](https://forum.juce.com/t/horrible-combobox/53529/5 "2022-10-28T22:54:31Z")

</div>

Do you mind sharing your fork or your modifications as this sounds very useful! Thanks.

---

<div class="post-metadata">

**Author:** ![aamf](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/aamf/32/19941_2.png) [@aamf](https://forum.juce.com/u/aamf)\
**Post date:** [October 31, 2022, 6:37pm UTC](https://forum.juce.com/t/horrible-combobox/53529/6 "2022-10-31T18:37:59Z")

</div>

Sure! I can gladly share it but I need to do quite a bit of code cleanup first and I’ll probably manage only in a couple of weeks.
