#๐Ÿ”’ how to change the color of the window frame

29 messages ยท Page 1 of 1 (latest)

nocturne lintel
sacred grailBOT
#

@nocturne lintel

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

subtle haven
#

is that not just the background

latent junco
#

is this tkinter?

nocturne lintel
nocturne lintel
latent junco
#

i think there are no methods included in tkinter to change the window border and title bar.
there is a method to remove them root.overrideredirect(True).
but when you want to change the colors or style, you would have to use a library specific to your operating system.

#

for example you could use this code to enable dark mode on windows:```py
import ctypes as ct

root.update()
ct.windll.dwmapi.DwmSetWindowAttribute(ct.windll.user32.GetParent(root.winfo_id()), 20, ct.byref(ct.c_int(2)), 4)```

nocturne lintel
#

I got this after using ttk.Notebook

#

this is what it looks like without

#

but I need ttk.Notebook

subtle haven
#

and did you check why it changes the color

#

you have to specify it to the notebook class not child_root

nocturne lintel
subtle haven
#

the link I sent directly takes you to the tag options

#

that tell you the options for appearance customization on the notebook class

nocturne lintel
#

I change the background itself but this handle doesn't change.

subtle haven
#

send as text not screenshot

subtle haven
#

I can't find anything on how to fix that little gap

nocturne lintel
#

I figured out that this is a frame from the tab

nocturne lintel
sacred grailBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.