MCPcopy Index your code
hub / github.com/python/cpython / onResize

Method onResize

Lib/turtledemo/__main__.py:204–208  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

202
203
204 def onResize(self, event):
205 cwidth = self.canvas.winfo_width()
206 cheight = self.canvas.winfo_height()
207 self.canvas.xview_moveto(0.5*(self.canvwidth-cwidth)/self.canvwidth)
208 self.canvas.yview_moveto(0.5*(self.canvheight-cheight)/self.canvheight)
209
210 def makeTextFrame(self, root):
211 self.text_frame = text_frame = Frame(root)

Callers

nothing calls this directly

Calls 4

winfo_widthMethod · 0.80
winfo_heightMethod · 0.80
xview_movetoMethod · 0.80
yview_movetoMethod · 0.80

Tested by

no test coverage detected