I am working in python and I need to change the colour text from a Tkinter.button, but I don't know any additional parameter, attached you may find small fragment code:

btn_enter = Tkinter.Button(root, text = "Show graphic", width=20, bg = '#DC143C', relief=RAISED)

Thanxxxs!

有帮助吗?

解决方案

Specify the fg argument:

btn_enter = Tkinter.Button(all_your_args, fg=your_desired_value)

It changes the foreground colour, which is simply the text here.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top