[wxPython-users] Treebook
Andrea
amarin at mr-service.it
Thu May 17 01:23:23 PDT 2007
I do some steps, now I don't have errors but I see only a frame without
page and subpage.
I don't know why.
My code:
import wx
colourList = [ 'Andrea', 'Martina', 'Zoe', 'Matly',]
class TestTreebook(wx.Frame):
def __init__(self, parent, id):
print 'second'
wx.Frame.__init__(self, parent, id, 'Test Treebook')
print 'third'
self.tb = wx.Treebook(self, id, style = wx.BK_DEFAULT)
print 'fourth'
for item in colourList:
self.tb1 = self.tb.AddPage(self.tb, item)
print 'Add page'
self.tb.AddSubPage(self.tb, item)
print 'Add Sub Page'
class MyApp(wx.App):
def OnInit(self):
print 'first'
self.frame = TestTreebook(parent = None, id = -1)
self.frame.Center()
#self.frame.SetTopWindow(self.frame)
self.frame.Show()
return True
if __name__ == '__main__':
app = MyApp()
app.MainLoop()
More information about the wxpython-users
mailing list