]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/tests/test7.py
initail Digital Mars makefile for stc
[wxWidgets.git] / wxPython / tests / test7.py
index 50f394ad5ff70333c427df9ad919b7b006cfd8ac..11b786e19ff3d7b17aaa68cf636ea5080c5006b7 100644 (file)
@@ -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))