Treebook

Andrea amarin at mr-service.it
Wed May 16 09:09:36 PDT 2007


Hi all,

I have a problem with wx.Treebook widget, I receive a strange error when 
I try to run the program, can someone explain me why I cannot create the 
treebook in my application?

Of course I make some mistakes.

The error is:

Segmentation fault (core dumped)

The code of program is:

#!/usr/bin/env python

import wx

colourList = [ "Aquamarine", "Grey", "Blue", "Blue Violet", 
"Brown", 				"Cadet Blue", "Coral", "Wheat", "Cyan", "Dark Grey", 			 
"Dark Green","Steel Blue",
                ]

class TestTB(wx.Treebook):
     def __init__(self, parent, id):
         wx.Treebook.__init__(self, parent, id, style=
                              wx.BK_DEFAULT)

         for colour in colourList:
             self.AddPage(self, colour)
             st = wx.StaticText(self, -1,
                           "Some test text",
                           wx.Point(10, 10))

class MyApp(wx.App):
     def OnInit(self):
         self.win = TestTB(parent = None, id = -1)
         self.win.Show()
         return True

if __name__ == '__main__':
     app = MyApp()
     app.MainLoop()




More information about the wxpython-users mailing list