CustomTkinter
CustomTkinter copied to clipboard
Creating a custom titlebar
Hi! im trying to create a custom titlebar but ran into an issue. I don't know how to access the colouring of the bottom frame, which I assume is the regular tkinter.TopLevel. Has anyone solved this before?
The code: class MainWindow(tk.CTkToplevel): def init(self, root, is_dark_mode): super().init() self.title("Editor") self.overrideredirect(True) self.geometry("980x930") self.root = root self.is_dark_mode = is_dark_mode self.self_ref = self self.configure(bg_color='transparent')
full_frame = tk.CTkFrame(self)
full_frame.pack(fill='both', expand=True)
titlebar_frame = tk.CTkFrame(full_frame)
titlebar_frame.pack(side='top', expand=True, fill='x')
left_frame = tk.CTkFrame(full_frame)
left_frame.pack(side="left", fill="both", expand=True)
right_frame = tk.CTkFrame(full_frame)
right_frame.pack(side="right", fill="both", expand=True)
@infiniteTesch There are already examples
https://github.com/TomSchimansky/CustomTkinter/discussions/736
https://github.com/TomSchimansky/CustomTkinter/discussions/1756#discussioncomment-6274965
Also try pywinstyles and CTkMenubar
This may also help: types of window