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
  Figure Gets Larger Every time I click a show button joshuagreineder 1 159 Jul-14-2022, 02:04 PM
Last Post: joshuagreineder
  [Tkinter] The Text in the Label widget Tkinter cuts off the Long text in the view malmustafa 4 296 Jun-26-2022, 06:26 PM
Last Post: menator01
  Tkinter - How can I change the default Notebook border color? TurboC 5 9,156 May-23-2022, 03:44 PM
Last Post: bigmac
  Can't get tkinter button to change color based on changes in data dford 4 1,542 Feb-13-2022, 01:57 PM
Last Post: dford
  Creating a function interrupt button tkinter AnotherSam 2 2,243 Oct-07-2021, 02:56 PM
Last Post: AnotherSam
  [Tkinter] Have tkinter button toggle on and off a continuously running function AnotherSam 5 1,728 Oct-01-2021, 05:00 PM
Last Post: Yoriz
  tkinter change the text of the checkbox zazas321 1 1,526 Sep-17-2021, 06:19 AM
Last Post: zazas321
  [Tkinter] Make my button text update? Skata100 1 1,144 Aug-07-2021, 05:37 AM
Last Post: deanhystad
  tkinter showing image in button rwahdan 3 3,042 Jun-16-2021, 06:08 AM
Last Post: Yoriz
  [Tkinter] Modify Class on Button Click KDog 4 2,654 May-11-2021, 08:43 PM
Last Post: KDog

Forum Jump:

User Panel Messages

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