我正在使用此样式来自定义Tkinter Notebook,它适用于TNotebook.Tab
,但它没有将任何样式应用于TNotebook.Frame
您能告诉我如何更改Notebook Frame背景颜色吗? / p>
style = ttk.Style()
style.theme_create('appstyle', parent = 'alt',
settings = {
"TNotebook": {
"configure": {
"tabmargins": [2, 5, 2, 0]
}
},
"TNotebook.Tab": {
"configure": {
"padding": [10, 1],
"background": "#eee"
},
"map": {
"background": [("selected", "LightGoldenRod")],
"expand": [("selected", [1, 1, 1, 0])]
}
},
"TNotebook.Frame": {
"configure": {
"background": "red"
}
}
}
)
style.theme_use('appstyle')