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
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.
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))