22
loading...
This website collects cookies to deliver better user experience
pip install tk
#importing the tkinter module
from tkinter import *
import tkinter
#assigning a "root" as the main window for our application
root = tkinter.Tk()
root.mainloop()
root.geometry('500x500')
#Just a basic text.
Label(root, text="Hello World!").pack()
#Just a basic text but bigger.
Label(root, text="Hello World!", font=20).pack()
#A bold text with a different font
Label(root, text="Hello World!", font=('Jokerman',25,'bold')).pack()
#A text with red background
Label(root, text="Hello World!",bg='red', font=10 ).pack()
#A text with red color
Label(root, text="Hello World!",fg='red', font=10 ).pack()
#importing the tkinter module
from tkinter import *
import tkinter
root = tkinter.Tk()
root.geometry('500x500')
#Main
#Just a basic text.
Label(root, text="Hello World!").pack()
#Just a basic text but bigger.
Label(root, text="Hello World!", font=20).pack()
#A bold text with a different font
Label(root, text="Hello World!", font=('Jokerman',25,'bold')).pack()
#A text with red background
Label(root, text="Hello World!",bg='red', font=10 ).pack()
#A text with red color
Label(root, text="Hello World!",fg='red', font=10 ).pack()
root.mainloop()