MCPcopy Create free account
hub / github.com/ActiveState/code / centerMe

Method centerMe

recipes/Python/167487_Windows_SAPI4/recipe-167487.py:386–398  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

384 return None
385
386 def centerMe(self):
387 #center
388 top = self.dialog
389 top.update()
390 sw = top.winfo_screenwidth()
391 sh = top.winfo_screenheight()
392 w = top.winfo_width()
393 h = 470#top.winfo_height()
394 x = (sw - w)/2
395 y = (sh - h)/2
396 geom = '%dx%d+%d+%d' % (w, h, x, y)
397 top.geometry(geom)
398 return None
399
400
401if __name__ == "__main__":

Callers 1

__init__Method · 0.95

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected