In Tkinter how do i remove focus from a widget?

后端 未结 6 892
余生分开走
余生分开走 2021-02-08 13:37

I\'d like to remove focus from a widget manually.

6条回答
  •  隐瞒了意图╮
    2021-02-08 14:08

    If you use ttk widgets you can "remove" the focus ring by removing the color; for example on a button:

    style = ttk.Style()
    style.configure('TButton', focuscolor='')
    

提交回复
热议问题