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")
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