some demo cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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])))
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user