سؤال

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