CustomTkinter icon indicating copy to clipboard operation
CustomTkinter copied to clipboard

Limit Number of Options in OptionMenu

Open JungleDifferential opened this issue 3 years ago • 2 comments

I have an OptionMenu that has over 50 options in it, When you click the drop down, it displays all (or at least from the bottom to the top of the screen) of the options, I think this looks really ugly. I looked around and didn't see a simple way to limit the number of options shown at once to a certain number (then scroll to cycle through the rest of the options). Is there some simple solution to this I am missing? Or do I have to go and make a custom widget (possibly has OptionMenu as a super class?). Thanks

JungleDifferential avatar Dec 14 '22 22:12 JungleDifferential

I don't think it's possible with built-in methods. But you can assign a new option menu for each certain number.

duruburak avatar Dec 16 '22 21:12 duruburak

Thanks, I'll be looking more into it soon.

JungleDifferential avatar Dec 16 '22 21:12 JungleDifferential

@JungleDifferential @duruburak Try this scrollable dropdown menu: https://github.com/Akascape/CTkScrollableDropdown

It is very easy to add this in the optionmenu.

Akascape avatar May 21 '23 09:05 Akascape