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 Radio button group not setting default selection simonc88 3 1,082 Mar-20-2025, 06:53 PM
Last Post: buran
  Trying to update label text using a grid button. Edward_ 7 1,771 Dec-18-2024, 03:05 AM
Last Post: Edward_
  Using place for a button, many examples but AttributeError, tkinter Edward_ 3 1,036 Dec-17-2024, 09:06 PM
Last Post: deanhystad
  Update Image on Button Click the_muffin_man 2 1,319 Nov-05-2024, 01:29 AM
Last Post: menator01
  Button to +1 in text box everytime it's clicked martyloo 1 1,426 May-01-2024, 02:32 PM
Last Post: Axel_Erfurt
  [Tkinter] TKinter Remove Button Frame Nu2Python 8 4,891 Jan-16-2024, 06:44 PM
Last Post: rob101
  tkinter - touchscreen, push the button like click the mouse John64 5 2,593 Jan-06-2024, 03:45 PM
Last Post: deanhystad
  Centering and adding a push button to a grid window, TKinter Edward_ 15 14,835 May-25-2023, 07:37 PM
Last Post: deanhystad
  [Tkinter] Updating tkinter text BliepMonster 5 12,119 Nov-28-2022, 01:42 AM
Last Post: deanhystad
  Can't change the colour of Tk button text Pilover 6 20,125 Nov-15-2022, 10:11 PM
Last Post: woooee

Forum Jump:

User Panel Messages

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