In the first example, a wx panel's init method is called
In the second example the same init error occurs
Note I generally use super instead for calling baseclass init method
class tiropanel(wx.lib.scrolledpanel.ScrolledPanel): def __init__(self, parent, id): wx.Panel.__init__(self, parent, id)it should be a scrolledpanel's init method that's called
class tiropanel(wx.lib.scrolledpanel.ScrolledPanel): def __init__(self, parent, id): wx.lib.scrolledpanel.ScrolledPanel.__init__(self, parent, id)and when calling setupscrolling don't pass self, the first parameter is scroll_x which is a Boolean True to allow horizontal scrolling, False otherwise.
self.SetupScrolling(self)if you don't want to pass any arguments don't pass anything
self.SetupScrolling()
In the second example the same init error occurs
class tiropanel(wx.lib.scrolledpanel.ScrolledPanel): def __init__(self, parent, id): wx.Panel.__init__(self, parent, id)should be
class tiropanel(wx.lib.scrolledpanel.ScrolledPanel): def __init__(self, parent, id): wx.lib.scrolledpanel.ScrolledPanel.__init__(self, parent, id)There is also an error in the linkspanel class
hbox.Add(tiropanel, 0, wx.EXPAND)should be
hbox.Add(self.tiropanel, 0, wx.EXPAND)as you had not capitolized the tiropanel class its trying to add that instead.
Note I generally use super instead for calling baseclass init method
class Tiropanel(wx.lib.scrolledpanel.ScrolledPanel): def __init__(self, parent, id): wx.lib.scrolledpanel.ScrolledPanel.__init__(self, parent, id)can be replaced with
class Tiropanel(wx.lib.scrolledpanel.ScrolledPanel): def __init__(self, parent, id): super(Tiropanel, self).__init__(parent, id)