install tkinter
pip3 install tk
tkinter window
from tkinter import *
root = Tk()
root.geometry("500x500")
root.title("My App")
root.config(bg="#ff0000")
def printhi(*args):
print("Hi!")
btn = Button(root, text="Click to print hi", command=printhi)
btn.place(x=200, y=200)
root.mainloop()
setup python in windows tikinter
Installing Tkinter in Windows
Tkinter comes with the Python installer. We just need to install Python from www.python.org, and it comes along with the Python. We don't need to install it separately. Click on the checkbox of tcl/tk and IDE.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us