回答編集履歴
2
追記
answer
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
-
|
1
|
+
失礼しました。
|
2
|
+
**調べた限りでは、設定できないみたいですね。**
|
2
3
|
|
4
|
+
---
|
5
|
+
|
3
6
|
```Python
|
4
7
|
from copy import deepcopy
|
5
8
|
import tkinter.ttk as ttk
|
@@ -11,8 +14,7 @@
|
|
11
14
|
style = ttk.Style()
|
12
15
|
NEW_STYLE:str = 'Plain.Notebook.tab'
|
13
16
|
SRC_STYLE:str = 'TNotebook.Tab'
|
14
|
-
|
17
|
+
_, attri = deepcopy(style.layout(SRC_STYLE))[0]
|
15
|
-
_, attri = src[0]
|
16
18
|
new_spec_style = (NEW_STYLE, attri)
|
17
19
|
style.element_create(NEW_STYLE, 'from', 'default')
|
18
20
|
style.layout(SRC_STYLE, [new_spec_style])
|
1
import文の位置を移動!!!
answer
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
こんな感じでしょうか。
|
2
2
|
|
3
3
|
```Python
|
4
|
+
from copy import deepcopy
|
5
|
+
import tkinter.ttk as ttk
|
6
|
+
|
4
7
|
class Notebook(ttk.Notebook):
|
5
8
|
def __init__(self, master=None, **kw):
|
6
9
|
super().__init__(master, **kw)
|
7
|
-
|
10
|
+
|
8
11
|
style = ttk.Style()
|
9
12
|
NEW_STYLE:str = 'Plain.Notebook.tab'
|
10
13
|
SRC_STYLE:str = 'TNotebook.Tab'
|