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 restarting the mainloop when button pressed zazas321 1 60 Yesterday, 12:31 PM
Last Post: deanhystad
  tkinter touchscreen scrolling - button press makes unwanted scrolling nanok66 1 130 Dec-28-2020, 10:00 PM
Last Post: nanok66
Question [Tkinter] Can I set background color for each item in tkinter Combobox? water 1 212 Dec-10-2020, 07:48 PM
Last Post: Larz60+
Photo Tkinter TEXT background image _ShevaKadu 5 1,160 Nov-02-2020, 10:34 AM
Last Post: joe_momma
  [Tkinter] Button click problem using OOP JohnB 5 351 Oct-21-2020, 12:43 PM
Last Post: JohnB
  Tkinter - How can I remove the background borders from ttk.Button? TurboC 4 759 Oct-18-2020, 10:58 AM
Last Post: TurboC
  Tkinter - How can I change the default Notebook border color? TurboC 4 914 Oct-06-2020, 10:35 PM
Last Post: TurboC
  [Tkinter] Text Upload LearningLittlebyLittle 0 304 Sep-04-2020, 07:55 PM
Last Post: LearningLittlebyLittle
  [Tkinter] button command tkinter Heyjoe 6 1,436 Jul-30-2020, 07:06 PM
Last Post: deanhystad
  [tkinter] color change for hovering over button teacher 4 1,461 Jul-04-2020, 06:33 AM
Last Post: teacher

Forum Jump:

User Panel Messages

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