From: Robin Dunn Date: Wed, 14 Nov 2001 04:01:42 +0000 (+0000) Subject: some demo cleanup X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f0db4f38504f7bc01f7bc2474243a4f6f84152a7?ds=sidebyside;hp=eef97940e8b59bebfbff8333a4dd1763d4b66dbf some demo cleanup git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/demo/wxMultipleChoiceDialog.py b/wxPython/demo/wxMultipleChoiceDialog.py index 6e3fb5de55..07fe583a3e 100644 --- a/wxPython/demo/wxMultipleChoiceDialog.py +++ b/wxPython/demo/wxMultipleChoiceDialog.py @@ -10,6 +10,7 @@ def runTest(frame, nb, log): dlg = wxMultipleChoiceDialog(frame, "Pick some from\n this list\nblah blah...", "m.s.d.", lst) + dlg.CenterOnScreen(wxBOTH) if (dlg.ShowModal() == wxID_OK): print "Selection:", dlg.GetValue(), " -> ", dlg.GetValueString() diff --git a/wxPython/demo/wxPopupWindow.py b/wxPython/demo/wxPopupWindow.py index d8c3320966..84d0199ba4 100644 --- a/wxPython/demo/wxPopupWindow.py +++ b/wxPython/demo/wxPopupWindow.py @@ -34,10 +34,10 @@ class TestPopup(wxPopupWindow): def OnMouseLeftDown(self, evt): self.ldPos = evt.GetEventObject().ClientToScreen(evt.GetPosition()) - if wxPlatform == "__WXMSW__": # this is weird... - self.wPos = self.GetParent().ClientToScreen(self.GetPosition()) - else: - self.wPos = self.GetPosition() +## if wxPlatform == "__WXMSW__": # this is weird... +## self.wPos = self.GetParent().ClientToScreen(self.GetPosition()) +## else: + self.wPos = self.GetPosition() self.CaptureMouse() def OnMouseMotion(self, evt): diff --git a/wxPython/demo/wxScrolledMessageDialog.py b/wxPython/demo/wxScrolledMessageDialog.py index e50d1e7c9e..210e0e16a9 100644 --- a/wxPython/demo/wxScrolledMessageDialog.py +++ b/wxPython/demo/wxScrolledMessageDialog.py @@ -8,6 +8,7 @@ def runTest(frame, nb, log): f = open("Main.py", "r") msg = f.read() dlg = wxScrolledMessageDialog(frame, msg, "message test") + dlg.CenterOnScreen(wxBOTH) dlg.ShowModal() #--------------------------------------------------------------------------- diff --git a/wxPython/demo/wxTextCtrl.py b/wxPython/demo/wxTextCtrl.py index dc6ee5f79a..56098d2023 100644 --- a/wxPython/demo/wxTextCtrl.py +++ b/wxPython/demo/wxTextCtrl.py @@ -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]))) #---------------------------------------------------------------------------