EVT_STC_START_DRAG(self, ID, self.OnStartDrag)
EVT_STC_MODIFIED(self, ID, self.OnModified)
+ EVT_WINDOW_DESTROY(self, self.OnDestroy)
+
+ def OnDestroy(self, evt):
+ # This is how the clipboard contents can be preserved after
+ # the app has exited.
+ wxTheClipboard.Flush()
+ evt.Skip()
+
def OnStartDrag(self, evt):
self.log.write("OnStartDrag: %d, %s\n"
ed = p = MySTC(nb, -1, log)
else:
- p = wxPanel(nb, -1)
+ p = wxPanel(nb, -1, style=wxNO_FULL_REPAINT_ON_RESIZE)
ed = MySTC(p, -1, log)
s = wxBoxSizer(wxHORIZONTAL)
s.Add(ed, 1, wxEXPAND)
ed.SetSelection(25, 35)
print "GetSelectedText(): ", repr(ed.GetSelectedText())
print "GetTextRange(25, 35): ", repr(ed.GetTextRange(25, 35))
-
+ print "FindText(0, max, 'indicators'): ",
+ print ed.FindText(0, ed.GetTextLength(), "indicators")
ed.GotoPos(0)
+
return p
"""
-
-## if __name__ == '__main__':
-## import sys
-## app = wxPySimpleApp()
-## frame = wxFrame(None, -1, "Tester...", size=(640, 480))
-## win = runTest(frame, frame, sys.stdout)
-## frame.Show(true)
-## app.MainLoop()
-
-
if __name__ == '__main__':
+ import sys,os
import run
- run.main(['', 'wxStyledTextCtrl_1'])
+ run.main(['', os.path.basename(sys.argv[0])])