2

I have an issue where my CTkTabview only takes up ~2/3 of the screen vertically.

class App(customtkinter.CTk):
    def __init__(self):
        super().__init__()

        self.grid_columnconfigure(0, weight=1)
        self.grid_rowconfigure(0, weight=1)

        self.homePage = TabView(self)
        self.homePage.grid(column=0, row=0, sticky="nsew")

class TabView(customtkinter.CTkTabview):
    def __init__(self, master):
        super().__init__(master)
        self.grid_columnconfigure(0, weight=1)
        self.grid_rowconfigure(0, weight=1)
        
        self.add("Tab")

        self.tab("Tab").grid_columnconfigure(0, weight=1)
        self.tab("Tab").grid_rowconfigure(0, weight=1)
        self.tab("Tab").grid(column=0, row=0, sticky="nsew")

1 Answer 1

2

This appears to be a bug in customtkinter.

Your TabView instance is occupying the entire window. However, the content portion of the CTkTabView widget is only occupying the topmost portion of the widget, and most of the space is unused. (You can see this if you add a label or something to the tab content.)

If you change the CTkTabView anchor to "s" (via super().init(master, anchor='s')), then this will work properly.

I created an issue in the customtkinter GitHub repo for this: github.com/TomSchimansky/CustomTkinter/issues/2739

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.