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

Method dnd_enter

Lib/tkinter/dnd.py:280–286  ·  view source on GitHub ↗
(self, source, event)

Source from the content-addressed store, hash-verified

278 return self
279
280 def dnd_enter(self, source, event):
281 self.canvas.focus_set() # Show highlight border
282 x, y = source.where(self.canvas, event)
283 x1, y1, x2, y2 = source.canvas.bbox(source.id)
284 dx, dy = x2-x1, y2-y1
285 self.dndid = self.canvas.create_rectangle(x, y, x+dx, y+dy)
286 self.dnd_motion(source, event)
287
288 def dnd_motion(self, source, event):
289 x, y = source.where(self.canvas, event)

Callers 1

on_motionMethod · 0.80

Calls 5

dnd_motionMethod · 0.95
whereMethod · 0.80
create_rectangleMethod · 0.80
focus_setMethod · 0.45
bboxMethod · 0.45

Tested by

no test coverage detected