python
1#キャンセルボタンの設置 2 button2 = ttk.Button(runButtonFrame, text=("閉じる"), command=root.destroy) 3 button2.pack(fill = "x", padx=30, side = "left") 4 #offsetPathEntry.invoke() 5 root.mainloop() 6
Tkinterを使用したGUIアプリケーションを作成しています。
ボタン操作でWindowを閉じる処理を追加したいのですが
上記コーディングだと以下のようなメッセージが出ます。
[SpyderKernelApp] WARNING | No such comm: 63c97771fc4111eb88b94851b70f422b
[SpyderKernelApp] WARNING | No such comm: de8124ccfcc711ebaf994851b70f422b
[SpyderKernelApp] WARNING | No such comm: b60531bffce511eba7254851b70f422b
can't invoke "event" command: application has been destroyed
while executing
"event generate $w <<ThemeChanged>>"
(procedure "ttk::ThemeChanged" line 6)
invoked from within
"ttk::ThemeChanged"
can't invoke "event" command: application has been destroyed
while executing
"event generate $w <<ThemeChanged>>"
(procedure "ttk::ThemeChanged" line 6)
invoked from within
"ttk::ThemeChanged"
can't invoke "event" command: application has been destroyed
while executing
"event generate $w <<ThemeChanged>>"
(procedure "ttk::ThemeChanged" line 6)
invoked from within
"ttk::ThemeChanged"
can't invoke "event" command: application has been destroyed
while executing
"event generate $w <<ThemeChanged>>"
(procedure "ttk::ThemeChanged" line 6)
invoked from within
"ttk::ThemeChanged"
また
button2 = ttk.Button(runButtonFrame, text=("閉じる"), command=root.quit)
にするとWindowの応答がなくなります。
恐れ入りますがご教示いただきたく存じます。
あなたの回答
tips
プレビュー