+ def OnTestReplace(self, evt):
+ self.tc.Replace(5, 9, "IS A")
+ #self.tc.Remove(5, 9)
+
+ def OnTestGetSelection(self, evt):
+ start, end = self.tc.GetSelection()
+ text = self.tc.GetValue()
+ if wxPlatform == "__WXMSW__": # This is why GetStringSelection was added
+ text = string.replace(text, '\n', '\r\n')
+ self.log.write("GetSelection(): (%d, %d)\n"
+ "\tGetStringSelection(): %s\n"
+ "\tSelectedText: %s\n" %
+ (start, end,
+ self.tc.GetStringSelection(),
+ repr(text[start:end])))
+
+