how to install tkinter on windows 10
no need to install it. It is usually preinstalled by default. Make sure you
write tkinter correctly (with capital letter T on versions less than python 3)
while importing
how to install tkinter on windows 10
no need to install it. It is usually preinstalled by default. Make sure you
write tkinter correctly (with capital letter T on versions less than python 3)
while importing
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()
tkinter python 3
import tkinter as tk
obj = tk.Tk() # Creates a tkinter object
label = tk.Label(obj, text="This is a text button")
basic tkinter window
from tkinter import *
root = Tk()
root.title("Hello World")
message_label = Label(root, text="Hello World")
message_label.pack()
root.mainloop()
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