문제

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