]>
Commit | Line | Data |
---|---|---|
1b55cabf RD |
1 | |
2 | from wxPython.wx import * | |
3 | from wxPython.lib.editor import wxEditor, wxPyEditor | |
4 | ||
5 | #---------------------------------------------------------------------- | |
6 | ||
7 | def runTest(frame, nb, log): | |
8 | win = wxPanel(nb, -1) | |
9 | ed = wxEditor(win) | |
10 | pyed = wxPyEditor(win) | |
11 | box = wxBoxSizer(wxVERTICAL) | |
12 | box.Add(ed, 1, wxALL|wxGROW, 5) | |
13 | box.Add(pyed, 1, wxALL|wxGROW, 5) | |
14 | win.SetSizer(box) | |
15 | win.SetAutoLayout(true) | |
16 | ||
17 | ed.SetText(["", | |
18 | "This is a simple text editor, the class name is", | |
19 | "wxEditor. Type a few lines and try it out."]) | |
20 | ||
21 | pyed.SetText(["# This one is a derived class named wxPyEditor.", | |
22 | "# It adds syntax highlighting, folding (press", | |
23 | "# F12 on the \"def\" line below) and other stuff.", | |
24 | "import sys", | |
25 | "def hello():", | |
26 | " print 'hello'", | |
27 | " for x in sys.path:", | |
28 | " print x", | |
29 | ""]) | |
30 | return win | |
31 | ||
32 | #---------------------------------------------------------------------- | |
33 | ||
34 | ||
35 | ||
36 | ||
37 | ||
38 | overview = """\ | |
39 | """ | |
40 | ||
41 | ||
42 |