Tuesday, February 11, 2020

Tkinter geometry in python

from tkinter import *
import tkinter as tk

# creating Tk windowmaster = Tk()

# setting geometry of tk windowmaster.geometry("200x200+100+100")

# button widgetb1 = Button(master, text = "Click me !")
b1.place(relx = 1, x =-2, y = 2, anchor = NE)

# label widgetl = Label(master, text = "I'm a Label")
l.place(anchor = NW)

# button widgetb2 = Button(master, text = "GFG")
b2.place(relx = 0.5, rely = 0.5, anchor = CENTER)

# infinite loop which is required to# run tkinter program infinitely# until an interrupt occursmainloop()

how to write a basic class in python

python class topic video