Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python, Tkinter, Change of label color

Tags:

python

tkinter

Is there a simple way to change the color of a text in a button?

I use button['text'] = 'input text here' to change what the button text will be after the push. Does something similar exist for the change of color, button['color'] = 'red'?

like image 824
hamp Avatar asked Apr 09 '16 18:04

hamp


1 Answers

Use the foreground option to set a color of the text in a button.

Example:

button.configure(foreground="red")
like image 93
Kidus Avatar answered Oct 10 '22 12:10

Kidus