我从这里获得了一个可以更改ttk Notebook tabheader单词颜色的脚本,请看下面,我的问题是,基于此脚本,如何使tabheader中的“ Ocam&TstCon”一词变为粗体?
white = "gray20"
gray = "gray85"
style = ttk.Style()
style.theme_create( "yummy", parent="alt", settings=
{"TNotebook.Tab":
{"configure":
{"background": white
},
"map":
{"background": [("selected", gray)]
}
}
}
)
style.theme_use("yummy")
rows = 0
while rows < 30:
window.rowconfigure(rows, weight=1)
window.columnconfigure(rows, weight=1)
rows += 1
nb = ttk.Notebook(window)
nb.grid(row=0, column=0, columnspan=50, rowspan=70, sticky='NESW')
# Adds tab 1 for Ocam & TstCon
page1 = ttk.Frame(nb)
nb.add(page1, text='Ocam & TstCon' )