how to create a python class in tkinter
# Import
from tkinter import *
# Class Section
class Window(object):
def __init__(self):
self.tk = Tk()
self.tk.title("Demo Window")
self.tk.geometry("500x500")
self.tk.resizable(0, 0)
self.tk.mainloop()
self.widgets()
pass
def widgets(self):
lbl = Label(self.tk, text="Hello")
lbl.pack()
pass
win = Window()