Overview

This tutorial briefly introduces the subject of graphical user interface (GUI) programming. If you are a little familiar with this field, want to learn more, or want to see how it is done in Python, then this tutorial is for you. We will see this tutorial in various section, and try to cover all the basics to advanced topics. The main GUI toolkit we are going to use here is Tk, It’s a Python’s default GUI. Tk may not be the latest and the best nor it has the most powerful GUI building block, but it is easy to use and you can build a GUI that works on most platforms.

Sample program

from tkinter import *
 
window = Tk()
 
window.title("Studyfied.com")
window.geometry("300x200")

label = Label(window, text="I, am Label", font=("Arial Bold", 16))
label.grid(column=0, row=0)

window.mainloop()

Run the program

py Sample.py

Output