]> git.saurik.com Git - wxWidgets.git/blame - wxPython/tests/tabs.py
don't do anything in SetBackgroundColour() if colour is invalid
[wxWidgets.git] / wxPython / tests / tabs.py
CommitLineData
8bf5d46e
RD
1from wxPython.wx import *
2import string, sys
3
4class Test:
5 def __init__(self):
6 self.panel = wxPanel(frame, -1)
7 self.box = wxListBox(self.panel, 100, wxPoint(10,10),
8 wxSize(300,100), [], wxLB_SINGLE|wxLB_SORT)
9 self.text = wxTextCtrl(self.panel, 110,'', wxPoint(310,10),
10 wxSize(300,100),wxTE_MULTILINE|wxTE_READONLY)
11 self.FillList()
12
13 def FillList(self):
14 line = 'This is a test'
15 self.box.Append(line)
16 self.text.AppendText(line)
17
18 def OnCloseWindow(self, event):
19 self.panel.Close(true)
20
21class MyApp(wxApp):
22 def OnInit(self):
23 global frame
24 frame = wxFrame(NULL,-1,'Main',wxDefaultPosition,wxSize(630,150))
25 test = Test()
26 frame.Show(true)
27 self.SetTopWindow(frame)
28 return true
29
30 def OnCloseWindow(self, event):
31 self.Destroy()
32
33if __name__ == '__main__':
34 app = MyApp(0)
35 app.MainLoop()
36
37
38