質問編集履歴
1
add code
title
CHANGED
File without changes
|
body
CHANGED
@@ -2,4 +2,29 @@
|
|
2
2
|
理由としては、このtkのバージョンは将来なくなる可能性があります。このエラーをなくすには、TK_SILENCE_DEPRECATION=1 を設定してください。と出ました。
|
3
3
|
なにをどのように設定すればいいのでしょうか。
|
4
4
|
Python初心者でわからないことが多いのですが、ご教示いただけないでしょうか。
|
5
|
-
macを使用してこのエラーがvsCodeのターミナルで出ています。
|
5
|
+
macを使用してこのエラーがvsCodeのターミナルで出ています。
|
6
|
+
|
7
|
+
|
8
|
+
```import tkinter as tk
|
9
|
+
TK_SILENCE_DEPRECATION=1
|
10
|
+
|
11
|
+
# Create the window
|
12
|
+
mainWindow = tk.Tk()
|
13
|
+
mainWindow.title("Task Timer")
|
14
|
+
mainWindow.resizable(0,0)
|
15
|
+
# mainWindow.iconphoto(False,tk.PhotoImage(file='icon.png'))
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
# The section on the left side of the window that holds the Add, Edit & Settings buttons.
|
20
|
+
configFrame = tk.Frame(master=mainWindow, width=200,height=500, bg="green") # Remove colour later
|
21
|
+
configFrame.pack(fill=tk.Y,side=tk.LEFT)
|
22
|
+
|
23
|
+
|
24
|
+
# The main section that holds the clock, tasks and start/stop button
|
25
|
+
mainFrame = tk.Frame(master=mainWindow, width=400, height=500, bg="red") # Remove colour later
|
26
|
+
mainFrame.pack(fill=tk.Y,side=tk.RIGHT)
|
27
|
+
|
28
|
+
# Run the program
|
29
|
+
mainWindow.mainloop()
|
30
|
+
```
|