In this video I’ll start to teach you how to build Graphical User Interface Apps (GUI Apps) with Python and Tkinter!

Tkinter is a GUI framework that comes with Python and let’s you easily create apps with ease!

In Tkinter, everything is a widget…a button widget, a label widget, etc.

In this playlist I’ll teach you all the widgets and how to use them to build your own app with Python!

Python Code: hello.py
(Github Code)

from tkinter import *

root = Tk()
root.title("Hello World!!")
root.iconbitmap('images/tkinter.ico')
root.geometry('500x350')

# Create global switch variable
global switch
switch = True
def change():
	global switch
	if switch == True:
		my_label.config(text="Goodbye World!")
		switch = False
	else:
		my_label.config(text="Hello World!")
		switch = True


# Create a Label
my_label = Label(root, text="Hello World!", font=("Helvetica", 24))
# Pack, Grid, Place
my_label.pack(pady=20)

# Create a Button
my_button = Button(root, text="Click Me!", font=("Helvetica", 16), command=change)
my_button.pack(pady=20)




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...