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

Method nearest

Lib/tkinter/__init__.py:3497–3500  ·  view source on GitHub ↗

Get index of item which is nearest to y coordinate Y.

(self, y)

Source from the content-addressed store, hash-verified

3495 self.tk.call((self._w, 'insert', index) + elements)
3496
3497 def nearest(self, y):
3498 """Get index of item which is nearest to y coordinate Y."""
3499 return self.tk.getint(self.tk.call(
3500 self._w, 'nearest', y))
3501
3502 def scan_mark(self, x, y):
3503 """Remember the current X, Y coordinates."""

Callers 1

keypress_eventMethod · 0.80

Calls 2

getintMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected