CTkScrollableDropdown icon indicating copy to clipboard operation
CTkScrollableDropdown copied to clipboard

It doesn't work

Open limafresh opened this issue 1 year ago • 4 comments

I inserted CTkScrollableDropdown on CTkCombobox where there are many items, and now this Combobox stops opening. It's a pity that this is so, the project is useful and I wanted to apply it to my project "Brushshe" (in my repository).

def text_settings(self):
        def change_text_size(size):
            self.font_size = int(size)
            self.tx_size_label.configure(text=self.font_size)

        def combobox_callback(value):
            self.tk_font = CTkFont(family=value, size=self.font_size)
            
        text_settings = CTkToplevel(app)
        text_settings.title("Налаштувати текст")
        self.tx_size_label = CTkLabel(text_settings, text=self.font_size)
        self.tx_size_label.pack()
        tx_size_slider = CTkSlider(text_settings, from_=11, to=96, command=change_text_size)
        tx_size_slider.set(self.font_size)
        tx_size_slider.pack()

        fonts_label = CTkLabel(text_settings, text="Шрифти з системи:")
        fonts_label.pack()
        fonts = list(font.families())
        fonts_combobox = CTkComboBox(text_settings, command=combobox_callback)
        fonts_combobox.set(self.tk_font['family'])
        fonts_combobox.pack()
        CTkScrollableDropdown(fonts_combobox, values=fonts)

The Combobox itself is there, but I can't expand its items.

limafresh avatar Sep 19 '24 13:09 limafresh

@l1mafresh Use CTkScrollableDropdownFrame instead of CTkScrollableDropdown (Toplevel)

Akascape avatar Sep 19 '24 14:09 Akascape

CTkScrollableDropdown

I already tried changing it to CTkScrollableDropdownFrame. The result - with CTkScrollableDropdown at least the text on the CTkCombobox was visible, and with CTkScrollableDropdownFrame - only an empty combobox with no text on it.

limafresh avatar Sep 19 '24 14:09 limafresh

@l1mafresh Can you provide a full example which I can test?

Akascape avatar Sep 19 '24 16:09 Akascape

@l1mafresh Can you provide a full example which I can test?

with CTkScrollableDropdown with CTkScrollableDropdown CTkScrollableDropdownFrame with CTkScrollableDropdownFrame

Download code with CTkScrollableDropdown: Brushshe.zip

limafresh avatar Sep 19 '24 17:09 limafresh