]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxEditor.py
2 from wxPython
.wx
import *
3 from wxPython
.lib
.editor
import wxEditor
, wxPyEditor
5 #----------------------------------------------------------------------
7 def runTest(frame
, nb
, log
):
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)
15 win
.SetAutoLayout(true
)
18 "This is a simple text editor, the class name is",
19 "wxEditor. Type a few lines and try it out.",
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.",
28 " for x in sys.path:",
33 #----------------------------------------------------------------------