Background color for Tk in Python

后端 未结 5 1354
青春惊慌失措
青春惊慌失措 2020-12-25 09:40

I\'m writing a slideshow program with Tkinter, but I don\'t know how to change the background color to black instead of the standard light gray. How can this be done?

<
5条回答
  •  南笙
    南笙 (楼主)
    2020-12-25 10:34

    widget['bg'] = '#000000'
    

    or

    widget['background'] = '#000000'
    

    would also work as hex-valued colors are also accepted.

提交回复
热议问题