ActiveBackground And ActiveForeground in Tkinter Button

ActiveBackground represents the background of the button when the mouse hover the button.

Activeforeground represents the font color of the button when the mouse hover the button.


******Your code Below*****

from tkinter import *

root= Tk()
root.title("Button activeforeground")
root.config(background="#FFF8DC")
root.geometry("900x400+350+86")


btn1= Button(root, text="ActiveBackground", font=("Times", 30, "bold"),activebackground="red")
btn2= Button(root, text="ActiveForeground", font=("Times", 30, "bold"),activeforeground="red")

btn1.pack(pady=20)
btn2.pack(pady=20)

root.mainloop()

********End Code**********

Write Down Code Your Code Editor. To show Your Output. If Use Pycharm Press Shift+F10 and Show Your Output.



Enjoy..............
If You Want To Learn More Plz Visit www.newpost24.com


If You Find More Plz Visit This Page.

Post a Comment

أحدث أقدم