]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/tests/thtest.py
added SetString(), deprecated SetLabel()
[wxWidgets.git] / wxPython / tests / thtest.py
... / ...
CommitLineData
1
2from wxPython.wx import *
3
4class someData:
5 def __init__(self, data="spam"):
6 self.data = data
7
8class errApp(wxApp):
9 def OnInit(self):
10 frame = wxFrame(NULL, -1, "Close to get an error", wxDefaultPosition,
11 wxSize(200,200))
12
13 tree = wxTreeCtrl(frame, -1, wxDefaultPosition, wxDefaultSize)
14
15 root = tree.AddRoot("Spam")
16 tree.SetPyData(root, someData())
17 #tree.SetPyData(root, "A string")
18 #tree.SetPyData(root, ["a list", "A string"])
19
20 frame.Show(true)
21 self.SetTopWindow(frame)
22 self.frame = frame
23 return true
24
25
26app = errApp(0)
27app.MainLoop()
28print "got to the end"
29