Skip to content Skip to sidebar Skip to footer

Tkinter - How Can I Change The Default Notebook Border Color?

Below is my example code: from tkinter import * from tkinter import ttk root = Tk() root.geometry('400x300') style=ttk.Style() style.configure('TNotebook', highlightbackground='#

Solution 1:

I think this should do the work. So, as I read it, you need to change the color of the background for focused and not-focused apps; also, for no borders, set the highlight thickness to 0 (ZERO):

from tkinter import *
root = Tk()
e = Entry(highlightthickness=2)
e.config(highlightbackground = "red", highlightcolor= "red")
e.pack()
root.mainloop()

Post a Comment for "Tkinter - How Can I Change The Default Notebook Border Color?"