X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..d94974609888885e0b75d0e01d901b03a6213979:/wxPython/tests/test7.py?ds=inline diff --git a/wxPython/tests/test7.py b/wxPython/tests/test7.py index 50f394ad5f..11b786e19f 100644 --- a/wxPython/tests/test7.py +++ b/wxPython/tests/test7.py @@ -35,17 +35,26 @@ class MyFrame(wxFrame): wxStaticText(panel, -1, "Size:", wxDLG_PNT(panel, wxPoint(4, 4)), wxDefaultSize) wxStaticText(panel, -1, "Pos:", - wxDLG_PNT(panel, wxPoint(4, 14)), wxDefaultSize) + wxDLG_PNT(panel, wxPoint(4, 18)), wxDefaultSize) + wxStaticText(panel, -1, "ScreenPos:", + wxDLG_PNT(panel, wxPoint(4, 32)), wxDefaultSize) self.sizeCtrl = wxTextCtrl(panel, -1, "", - wxDLG_PNT(panel, wxPoint(24, 4)), + wxDLG_PNT(panel, wxPoint(36, 4)), wxDLG_SZE(panel, wxSize(36, -1)), wxTE_READONLY) self.posCtrl = wxTextCtrl(panel, -1, "", - wxDLG_PNT(panel, wxPoint(24, 14)), + wxDLG_PNT(panel, wxPoint(36, 18)), wxDLG_SZE(panel, wxSize(36, -1)), wxTE_READONLY) + self.sposCtrl = wxTextCtrl(panel, -1, "", + wxDLG_PNT(panel, wxPoint(36, 32)), + wxDLG_SZE(panel, wxSize(36, -1)), + wxTE_READONLY) + + panel.Fit() + self.Fit() # This method is called automatically when the CLOSE event is # sent to this window @@ -59,6 +68,8 @@ class MyFrame(wxFrame): def OnSize(self, event): size = event.GetSize() self.sizeCtrl.SetValue("%s, %s" % (size.width, size.height)) + p = self.ClientToScreen((0,0)) + self.sposCtrl.SetValue("%s, %s" % (p.x, p.y)) # tell the event system to continue looking for an event handler, # so the default handler will get called. @@ -69,6 +80,8 @@ class MyFrame(wxFrame): def OnMove(self, event): pos = event.GetPosition() self.posCtrl.SetValue("%s, %s" % (pos.x, pos.y)) + p = self.ClientToScreen((0,0)) + self.sposCtrl.SetValue("%s, %s" % (p.x, p.y))