]>
Commit | Line | Data |
---|---|---|
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, -1, style=wxSUNKEN_BORDER) | |
10 | pyed = wxPyEditor(win, -1, style=wxSUNKEN_BORDER) | |
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 | ||
22 | pyed.SetText(["# This one is a derived class named wxPyEditor.", | |
23 | "# It adds syntax highlighting, folding (press", | |
24 | "# F12 on the \"def\" line below) and other stuff.", | |
25 | "import sys", | |
26 | "def hello():", | |
27 | " print 'hello'", | |
28 | " for x in sys.path:", | |
29 | " print x", | |
30 | ""]) | |
31 | return win | |
32 | ||
33 | #---------------------------------------------------------------------- | |
34 | ||
35 | ||
36 | ||
37 | ||
38 | ||
39 | overview = """\ | |
40 | """ | |
41 | ||
42 | ||
43 |