0

Is it possible to change the title bar but just switch it to dark mode? Without creating a frame and all, just switch it to dark?

Light title bar:

Dark title bar:

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
Hoag
  • 13
  • 5

1 Answers1

-1

list of themes for tkinter is here: https://wiki.tcl-lang.org/page/List+of+ttk+Themes

There is a whole variety of standard dark themes even before customisation of other themes...

Here is a code example:

from tkinter import ttk  # Normal Tkinter.* widgets are not themed!
from ttkthemes import ThemedTk

# light themes
# window = ThemedTk(theme="arc")
# window = ThemedTk(theme="kroc")
# window = ThemedTk(theme="ubuntu")

# dark themes
# window = ThemedTk(theme="black")
window = ThemedTk(theme="equilux")

ttk.Button(window, text="Quit", command=window.destroy).pack()
window.mainloop()

If it it just the title bar (and not the theme) that you are wishing to change then this post covers it:

Can I change the title bar in Tkinter?

D.L
  • 4,339
  • 5
  • 22
  • 45
  • ttk theme cannot change color of window title bar which is what OP wants. – acw1668 Mar 06 '22 at 15:45
  • @acw1668 i read it as switch to dark mode, but have also included a link to the title bar itself: https://stackoverflow.com/questions/23836000/can-i-change-the-title-bar-in-tkinter – D.L Mar 06 '22 at 15:57