質問編集履歴
3
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -132,9 +132,9 @@
|
|
132
132
|
|
133
133
|
id.append(tree.insert("", "end", value=["aaa", "bbb", "ccc"]))
|
134
134
|
|
135
|
-
id.append(tree.insert("", "end", value=["ddd", "eee", "fff"], tags=
|
135
|
+
id.append(tree.insert("", "end", value=["ddd", "eee", "fff"], tags="mytag1"))
|
136
136
|
|
137
|
-
id.append(tree.insert("", "end", value=["ggg", "hhh", "iii"], tags=
|
137
|
+
id.append(tree.insert("", "end", value=["ggg", "hhh", "iii"], tags="mytag2"))
|
138
138
|
|
139
139
|
|
140
140
|
|
2
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -128,13 +128,23 @@
|
|
128
128
|
|
129
129
|
# インサート
|
130
130
|
|
131
|
-
|
131
|
+
id = []
|
132
132
|
|
133
|
-
tree.insert("", "end", value=["
|
133
|
+
id.append(tree.insert("", "end", value=["aaa", "bbb", "ccc"]))
|
134
134
|
|
135
|
+
id.append(tree.insert("", "end", value=["ddd", "eee", "fff"], tags=("mytag1")))
|
136
|
+
|
135
|
-
tree.insert("", "end", value=["ggg", "hhh", "iii"], tags=("mytag2"))
|
137
|
+
id.append(tree.insert("", "end", value=["ggg", "hhh", "iii"], tags=("mytag2")))
|
136
138
|
|
137
139
|
|
140
|
+
|
141
|
+
# 後からtag変更
|
142
|
+
|
143
|
+
#tree.item(id[1], tags="")
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
# 全id取得
|
138
148
|
|
139
149
|
#print(tree.get_children())
|
140
150
|
|
1
追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
[tkinter ttk treeview色付きの行](https://www.it-swarm-ja.tech/ja/python/tkinter-ttk-treeview%E8%89%B2%E4%BB%98%E3%81%8D%E3%81%AE%E8%A1%8C/815083360/)
|
4
4
|
|
5
5
|
を参考に文字色の色を設定できましたが、背景色が変更できていません。
|
6
|
+
|
7
|
+
(行クリック時の選択状態のときは別の色にしたいです。)
|
6
8
|
|
7
9
|
|
8
10
|
|