I have this minimal tkinter program:
import tkinter
import tkinter.ttk as ttk
root = tkinter.Tk()
s = ttk.Style()
s.theme_use("winnative")
b1 = ttk.Button(root, text="Button")
b1.pack()
b2 = ttk.Checkbutton(root, text="Checkbutton")
b2.pack()
v = tkinter.IntVar()
v.set(0)
b3 = ttk.Radiobutton(root, text="option 1", variable=v, value=0)
b4 = ttk.Radiobutton(root, text="option 2", variable=v, value=1)
b3.pack()
b4.pack()
tkinter.mainloop()
When I run it, I get this GUI (see image below). When I click one of the widgets, it gets a focus rectangle around (the dashed rectangle). I would like to suppress this but I can't find any documentation about it.
Is there a consistent way of removing this rectangle for all the widget types. I found one solution for the Notebook tabs (here Removing Ttk Notebook Tab Dashed Line), but I can't figure out how to apply it to other widgets.