首页 > 解决方案 > 删除笔记本标签 tkinter 周围的虚线

问题描述

我最近正在尝试使用 tkinter python 制作 pokedex,我做得很好,但是出现了一个问题,这使得整个界面变得丑陋!

每个活动按钮和笔记本选项卡中都有一个虚线边框,破坏了整个程序的外观。

样式代码也没有解决!

注意:我尝试使用focuscolor,但没有帮助......

import tkinter as tk
from tkinter.ttk import *

root = tk.Tk()
root.geometry('700x500')

Style().configure('lefttab.TNotebook', tabposition='wn')
Style().configure('TNotebook.Tab', font='Courier 16')

notebook = Notebook(root, style='lefttab.TNotebook')
f1 = tk.Frame(notebook, width=500, height=400)
f2 = tk.Frame(notebook, width=500, height=400)

notebook.add(f1, text='Kantodex Vx')
notebook.add(f2, text='  Attacks  ')

notebook.pack(anchor=tk.NW)

root.mainloop()

标签: pythontkinter

解决方案


推荐阅读