フレームやボタンに背景色を着ける方法が分からないです。
python
1import tkinter 2 3def close(e): 4 root.quit() 5 6root = tkinter.Tk() 7root.geometry("200x200") 8 9frame1 = tkinter.Frame(root, bg="#aaaaaa", bd=2, relief="ridge") 10frame1.pack() 11button1 = tkinter.Button(frame1, bg="green", text="close") 12button1.pack() 13button1.bind("<Button-1>", close) 14 15root.mainloop() 16
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。