Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How To Make A Window Python

#Window Script
import tkinter as tk

root = tk.Tk()

canvas = tk.Canvas(root, height=600, width=1000, bg="#f0f0f0") #canvas set to #f0f0f0 to hide the canvas but change the scaling settings
canvas.pack()

frame = tk.Frame(root, bg="#f0f0f0") #f0f0f0 is the light gray default color for windows in windows 10/11
frame.place(relwidth=1.0, relheight=1.0, relx=0.1, rely=0.1) #auto center the canvas

root.mainloop()
#open with python instead of your code editor
 
PREVIOUS NEXT
Tagged: #How #To #Make #A #Window #Python
ADD COMMENT
Topic
Name
8+9 =