Python Forum

Full Version: tkinter | Button color text on Click
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys! I need some help from you.

for tkinter to change button color is 'fg, 'bg' for background. On click to change the background is 'activebackground', what is the property on click to change the text color, by default is black.
Please post what you have written so it can be reviewed and commented on for help.
self.btnAddEmp = Button(self.centerFrame, text = 'Add Employee', bd = 0, padx = 10, bg = '#252526', fg = '#b3b3b3', cursor = 'hand2', activebackground = '#1DB954', activeforeground = '#FFF')

activeforeground = '#FFF'