Vertical overflow for Dropdown control's lists


Amin Mousavi
Hi David,
Hope you are all good and have enjoyed the holidays :)
I have a dropdown with about 40 items in it, high number of items stretches the app too much down. I would like to be able to have the items scrolled, yet could not achieve it with, max-height , overflow it acts on the button alone. Also tried to put it in a container and control the container but still not success. Any suggestions? I have tried select, it is better but dropdowns look better in my app,
Thanks

decsoft

Hello Amin,

Happy New Year! :-) If what you wanted is to apply a "max overflow" to all the Dropdown menus, try with the below CSS code in the Inline CSS app's option or in any CSS added to the app by the Files manager:

Additionally, you can be also more specific by apply the above CSS code to a specific Dropdown control, like below:

The above CSS code is applied to the list that is shown for a "Button1" Dropdown control, and no other control.



Amin Mousavi
Hi David,
Thanks a alot for your quick response. Have a question here, I tried the very same CSS but like below: and entered TestClass into dropdown classes, how come it does not work like that? Perhaps only dropdown's container takes the class like this?

decsoft

Hello Amin,

Yes; you are right: the CSS classes that we can place from the Object inspector, for example, apply to the container of the Dropdown, but, the control HTML markup is composed by more than the container, so, we can't get it working in this way, since we do not apply the CSS code to the right HTML element. Maybe we can go ahead by using the CSS class of the container and then refer to it from the CSS code... but I am not sure if this can have here any advantage: probably the above solutions can be enough.



Amin Mousavi
Thanks for the clarification David. Much appreciated!

decsoft

Hello Amin,

Thanks for the clarification David. Much appreciated!

You're welcome! :-)


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.