Python Forum
tkinter | Button color text on Click
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tkinter | Button color text on Click
#1
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.
Reply
#2
Please post what you have written so it can be reviewed and commented on for help.
Reply
#3
self.btnAddEmp = Button(self.centerFrame, text = 'Add Employee', bd = 0, padx = 10, bg = '#252526', fg = '#b3b3b3', cursor = 'hand2', activebackground = '#1DB954', activeforeground = '#FFF')

activeforeground = '#FFF'
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  tkinter showing image in button rwahdan 3 101 Jun-16-2021, 06:08 AM
Last Post: Yoriz
  [Tkinter] Modify Class on Button Click KDog 4 1,241 May-11-2021, 08:43 PM
Last Post: KDog
  Updating button text based upon different variable values knoxvilles_joker 0 240 Apr-18-2021, 04:13 AM
Last Post: knoxvilles_joker
  tkinter text widget word wrap position chrisdb 6 1,170 Mar-18-2021, 03:55 PM
Last Post: chrisdb
  [Tkinter] tkinter.Menu – How to make text-variable? Sir 3 1,161 Mar-10-2021, 04:21 PM
Last Post: Sir
  tkinter button image Nick_tkinter 4 559 Mar-04-2021, 11:33 PM
Last Post: deanhystad
  tkinter python button position problem Nick_tkinter 3 694 Jan-31-2021, 05:15 AM
Last Post: deanhystad
  TKinter restarting the mainloop when button pressed zazas321 7 1,419 Jan-26-2021, 06:38 AM
Last Post: zazas321
  tkinter touchscreen scrolling - button press makes unwanted scrolling nanok66 1 568 Dec-28-2020, 10:00 PM
Last Post: nanok66
Question [Tkinter] Can I set background color for each item in tkinter Combobox? water 1 1,316 Dec-10-2020, 07:48 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020