Skip to content

CTkScrollableDropdownFrame place_dropdown bug #48

@teijiIshida

Description

@teijiIshida

I was testing both CTkScrollableDropdown and CTkScrollableDropdownFrame. CTkScrollableDropdownFrame is faster than CTkScrollableDropdown, so I decide to use it. However, CTkScrollableDropdownFrame has a bug with place_dropdown. If I have my CTkOptionMenu on top of a fixed frame, then its placement is correct. But if the CTkOptionMenu is on a non-fixed frame, then the dropdown placement is incorrect (see picture below). If you need additional info, let me know.

top_frame (fixed): place correctly
2024-07-24 14_50_12-Vulcan py - TGMAIN - Visual Studio Code

main_frame (non-fixed): place wrong
bug

This is the relevant code provided by your CTkDesigner app.

    def switch_page(self, page) -> None:
        pages: list[ctk.CTkFrame] = [self.Page_1, self.Page_2, self.Page_3, self.Page_4]

        for i in pages:
            i.pack_forget()
        
        page.pack(expand=True, fill='both')

        fixed_widgets: list[ctk.CTkFrame] = [self.top_frame]
        for widget in fixed_widgets:
            widget.lift()
            widget.place(x=widget.winfo_x(), y=widget.winfo_y())

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions