How do I change the colour of my button and label on Tkinter?

后端 未结 4 479
盖世英雄少女心
盖世英雄少女心 2021-01-26 12:35

My task is to create a label and button on Tkinter. The button has to change the label, and I have to change the colour of the button and the label. I have changed the colour of

4条回答
  •  心在旅途
    2021-01-26 13:22

    For a ttk button the primary issue with color control requires usage of ttk.Style() and theme_use. Themes alt/classic/default allow 3D/color button control. See Python: Changing ttk button color depending on current color? for a code example using configure and map for style.

提交回复
热议问题