wxWidgets/utils/wxPython/demo/wxEditor.py
Robin Dunn 1b55cabf50 Added wxEditor from Dirc Holtwic
Some tweaks and fixes
Some distrib updates


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-12-31 08:29:02 +00:00

43 lines
1.1 KiB
Python

from wxPython.wx import *
from wxPython.lib.editor import wxEditor, wxPyEditor
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = wxPanel(nb, -1)
ed = wxEditor(win)
pyed = wxPyEditor(win)
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",
"wxEditor. Type a few lines and try it out."])
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 = """\
"""