I have question for the below code, I could understand that the code has def __init__
function, it is necessary to initialize the Frame class, but I still could not understand that why we need to have wx.Frame.__init__
? Is it necessary to initialize the wx.Frame object?
import wx
class Frame(wx.Frame):
def __init__(self, title):
wx.Frame.__init__(self, None, title=title, size=(350,200))
app = wx.App(redirect=True)
top = Frame("Hello World")
top.Show()
app.MainLoop()