CustomTkinter icon indicating copy to clipboard operation
CustomTkinter copied to clipboard

Creating a custom titlebar

Open infiniteTesch opened this issue 1 year ago • 1 comments

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?

edges

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 avatar Dec 12 '23 11:12 infiniteTesch

@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

Akascape avatar Dec 12 '23 19:12 Akascape