I tried using a sizer in the MyControl class and all the buttons were displayed:
class MyControl(wx.PyControl):
def __init__(self, parent, i):
wx.PyControl.__init__(self, parent, wx.ID_ANY, wx.DefaultPosition, size=(100,100))
# Just saving the button in a variable
btn = wx.Button(self, wx.ID_ANY, "btn %d" % i, (0,0), (50,50), 0)
# Creating sizer and placing the button in sizer
sizer = wx.BoxSizer()
sizer.Add(btn)
self.SetSizer(sizer)
You can mess around with the sizer arguments to make them fill up the space how you want it. Is this the type of solution you were looking for?