回答編集履歴

1

2022/01/22 10:50

投稿

ppaul
ppaul

スコア24666

test CHANGED
@@ -8,3 +8,14 @@
8
8
  実行結果
9
9
  ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-01-22/cbff82cd-b2eb-4e71-b495-cbcd4c07f0dc.png)
10
10
 
11
+ 数を沢山出したいのであれば、以下のようにすれば良いでしょう。
12
+
13
+ ```python
14
+ colors = {'日': 'black', '月':'red', '火':'black', '水':'black', '木':'black','金': 'blue', '土':'black'}
15
+
16
+ days = ['日', '月', '火', '木', '金'] #これを増やせば、表示も増えます。
17
+ layout = [[sg.Text(day, text_color=colors[day]) for day in days], [sg.Button('Quit'),sg.Button('OK')]]
18
+ ```
19
+
20
+
21
+