In this video I’ll teach you absolutely everything you could ever possibly want to know about the Button Widget!

I’ll discuss every single Attribute that the widget has, including:

TKINTER BUTTON ATTRIBUTES
✩ text
✩ activebackground
✩ activeforeground
✩ anchor
✩ bg
✩ bd
✩ command
✩ default
✩ disabledforeground
✩ font
✩ fg
✩ height
✩ highlightbackground
✩ highlightcolor
✩ image
✩ justify
✩ overrelief
✩ relief
✩ state
✩ takefocus
✩ underline
✩ width
✩ wraplength

And more…

Get a FREE Copy Of My Tkinter Widget Quick Reference Guide Book:
https://bit.ly/3K4qlZC

Subscribe To The Tkinter.com Youtube Channel:
https://bit.ly/3Pk1By4

Python Code: buttons.py
(Github Code)

from tkinter import *

# Define Our Main Screen
root = Tk()
root.title('Tkinter.com - Button Widget!')
root.iconbitmap('c:/tkinter.com/images/codemy.ico')
root.geometry("500x350")

def clicker():
	my_button.config(text="You Clicked The Button!")
	my_button.config(width="19")	

#Define an Image
login = PhotoImage(file='images/login.png')

my_button = Button(root, text="Click Me!",
	activebackground="black",
	activeforeground="red",
	anchor="center",
	bg="systembuttonface",
	bd="2",
	command=clicker,
	default="disabled",
	disabledforeground="green",
	font=("Helvetica", 32),
	fg="blue",
	#height="10",
	#highlightbackground="blue",
	#highlightcolor="red",
	#image=login,
	justify="center",
	overrelief="raised",
	relief="raised",
	state="normal",
	takefocus=TRUE,
	underline=3,
	width="10",
	wraplength="0"
	)
my_button.pack(pady=50)




# Create The Mainloop That All Apps Need
root.mainloop()

John Elder

John is the CEO of Codemy.com where he teaches over 100,000 students how to code! He founded one of the Internet's earliest advertising networks and sold it to a publicly company at the height of the first dot com boom. After that he developed the award-winning Submission-Spider search engine submission software that's been used by over 3 million individuals, businesses, and governments in over 42 countries. He's written several Amazon #1 best selling books on coding, and runs a popular Youtube coding channel.

View all posts

Add comment

Your email address will not be published. Required fields are marked *

John Elder

John is the CEO of Codemy.com where he teaches over 100,000 students how to code! He founded one of the Internet's earliest advertising networks and sold it to a publicly company at the height of...