Learning Python OOP with classes. The 2 line procedural testframe appears, but the class iframe does not
14:49 01 Sep 2026
from tkinter import *

root = Tk()

root.geometry("600x300+80+80")
root.configure(bg='#cdb')


class iframe(Frame):

    def __init__(self, root, bg, width, height, relief):
        super(iframe, self).__init__()

        self.bg = bg
        self.width = width
        self.height = height
        self.relief = relief


myframe = iframe(
    root,
    bg='#afd',
    width=60,
    height=30,
    relief="sunken"
)

myframe.pack(side=RIGHT)


testframe = Frame(
    root,
    bg='#afd',
    width=80,
    height=30,
    relief="groove"
)

testframe.pack(side=LEFT)


def main():
    root.mainloop()


if __name__ == '__main__':
    main()
python oop tkinter