1999-12-31 08:29:02 +00:00
|
|
|
|
|
|
|
from wxPython.wx import *
|
|
|
|
from wxPython.lib.editor import wxEditor, wxPyEditor
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
def runTest(frame, nb, log):
|
|
|
|
win = wxPanel(nb, -1)
|
2000-01-03 19:30:51 +00:00
|
|
|
ed = wxEditor(win, -1, style=wxSUNKEN_BORDER)
|
|
|
|
pyed = wxPyEditor(win, -1, style=wxSUNKEN_BORDER)
|
1999-12-31 08:29:02 +00:00
|
|
|
box = wxBoxSizer(wxVERTICAL)
|
|
|
|
box.Add(ed, 1, wxALL|wxGROW, 5)
|
|
|
|
box.Add(pyed, 1, wxALL|wxGROW, 5)
|
|
|
|
win.SetSizer(box)
|
|
|
|
win.SetAutoLayout(true)
|
|
|
|
|
|
|
|
ed.SetText(["",
|
|
|
|
"This is a simple text editor, the class name is",
|
2000-01-02 05:26:21 +00:00
|
|
|
"wxEditor. Type a few lines and try it out.",
|
|
|
|
""])
|
1999-12-31 08:29:02 +00:00
|
|
|
|
|
|
|
pyed.SetText(["# This one is a derived class named wxPyEditor.",
|
|
|
|
"# It adds syntax highlighting, folding (press",
|
|
|
|
"# F12 on the \"def\" line below) and other stuff.",
|
|
|
|
"import sys",
|
|
|
|
"def hello():",
|
|
|
|
" print 'hello'",
|
|
|
|
" for x in sys.path:",
|
|
|
|
" print x",
|
|
|
|
""])
|
|
|
|
return win
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
overview = """\
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
|