CustomTkinter icon indicating copy to clipboard operation
CustomTkinter copied to clipboard

combobox/optionmenu scroll bar?

Open Azuremoon13 opened this issue 3 years ago • 9 comments
trafficstars

Discussed in https://github.com/TomSchimansky/CustomTkinter/discussions/249

is it possible to have like a default tkinter scroll bar for these items?if so any examples? also how do i stop these when clicked on taking up the full size of my screen?

Azuremoon13 avatar Jul 12 '22 21:07 Azuremoon13

Are you using Linux? On Windows and macOS the tkinter menu which is used for the dropdown menu has some sort of scrolling, but not on Linux for some reason. I will have a look if its possible to maybe use a tsk menu or something.

TomSchimansky avatar Jul 17 '22 16:07 TomSchimansky

no im on windows, and yes it has 2 arrows top and bottom of the dropdown.. but was wondering if you could attach an actual scroll bar? also is there a way to set fixed height of the dropdown when its opened? as if you have a lot its spans the whole screen

Azuremoon13 avatar Jul 17 '22 18:07 Azuremoon13

As far as I can see there is no option to set the max height for a tkinter menu: https://anzeljg.github.io/rin2/book2/2405/docs/tkinter/menu.html https://stackoverflow.com/questions/30027138/how-to-get-set-menu-widget-height

TomSchimansky avatar Jul 17 '22 18:07 TomSchimansky

oh yea.. i think i might have to swap to a combo box then as you can limit them.. possible to add from your end to dropdowns too?

Azuremoon13 avatar Jul 17 '22 18:07 Azuremoon13

Hello, The regular drop-down menu has limited options. TKinter also has combobox which look much better in some cases. The current combobox in CTk doesn't look good for longer lists ; /

wojas007 avatar Aug 25 '22 08:08 wojas007

hello, In the ttk has the option to limit the height of combobox or optionmenu maybe you can see that using the ttk as an example. thanks for the incredible work!

GGTEC avatar Sep 14 '22 16:09 GGTEC

@Azuremoon13 @GGTEC @wojas007 Here is a custom made menu with scrollable options: https://github.com/Akascape/CTkScrollableDropdown

It is easy to use, just attach the name of the combobox/optionmenu.

Akascape avatar May 21 '23 09:05 Akascape