]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/wxTextCtrl.py
typo fixed: should be lpthread, not -lpthread in THREAD_OPTS
[wxWidgets.git] / wxPython / demo / wxTextCtrl.py
index dc6ee5f79a1d5073b70bdf8ff6fa052152d902d1..56098d2023f6b63e0f7694954f0eaf80d0ad5cdb 100644 (file)
@@ -90,11 +90,14 @@ class TestPanel(wxPanel):
     def OnTestGetSelection(self, evt):
         start, end = self.tc.GetSelection()
         text = self.tc.GetValue()
-        # Looks like a bug here, but only if not wxTE_RICH...
-        if wxPlatform == "__WXMSW__":
+        if wxPlatform == "__WXMSW__":  # This is why GetStringSelection was added
             text = string.replace(text, '\n', '\r\n')
-        self.log.write("GetSelection(): (%d, %d)\n\tSelectedText: %s\n" %
-                       (start, end, repr(text[start:end])))
+        self.log.write("GetSelection(): (%d, %d)\n"
+                       "\tGetStringSelection(): %s\n"
+                       "\tSelectedText: %s\n" %
+                       (start, end,
+                        self.tc.GetStringSelection(),
+                        repr(text[start:end])))
 
 
 #---------------------------------------------------------------------------