Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It doesn't work #52

Open
limafresh opened this issue Sep 19, 2024 · 4 comments
Open

It doesn't work #52

limafresh opened this issue Sep 19, 2024 · 4 comments

Comments

@limafresh
Copy link

limafresh commented Sep 19, 2024

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.

@Akascape
Copy link
Owner

@l1mafresh Use CTkScrollableDropdownFrame instead of CTkScrollableDropdown (Toplevel)

@limafresh
Copy link
Author

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.

@Akascape
Copy link
Owner

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

@limafresh
Copy link
Author

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

with CTkScrollableDropdown
with CTkScrollableDropdown
CTkScrollableDropdownFrame
with CTkScrollableDropdownFrame

Download code with CTkScrollableDropdown:
Brushshe.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants