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

Method adjust_label

Lib/tkinter/ttk.py:1548–1557  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1546 def _adjust(self, *args):
1547 """Adjust the label position according to the scale."""
1548 def adjust_label():
1549 self.update_idletasks() # "force" scale redraw
1550
1551 x, y = self.scale.coords()
1552 if self._label_top:
1553 y = self.scale.winfo_y() - self.label.winfo_reqheight()
1554 else:
1555 y = self.scale.winfo_reqheight() + self.label.winfo_reqheight()
1556
1557 self.label.place_configure(x=x, y=y)
1558
1559 from_ = _to_number(self.scale['from'])
1560 to = _to_number(self.scale['to'])

Callers

nothing calls this directly

Calls 5

update_idletasksMethod · 0.80
winfo_yMethod · 0.80
winfo_reqheightMethod · 0.80
place_configureMethod · 0.80
coordsMethod · 0.45

Tested by

no test coverage detected