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

Method set_tk_tabwidth

Lib/idlelib/editor.py:1278–1285  ·  view source on GitHub ↗
(self, newtabwidth)

Source from the content-addressed store, hash-verified

1276 # Set the text widget's current view of what a tab stop means.
1277
1278 def set_tk_tabwidth(self, newtabwidth):
1279 text = self.text
1280 if self.get_tk_tabwidth() != newtabwidth:
1281 # Set text widget tab width
1282 pixels = text.tk.call("font", "measure", text["font"],
1283 "-displayof", text.master,
1284 "n" * newtabwidth)
1285 text.configure(tabs=pixels)
1286
1287### begin autoindent code ### (configuration was moved to beginning of class)
1288

Callers 1

Calls 3

get_tk_tabwidthMethod · 0.95
callMethod · 0.45
configureMethod · 0.45

Tested by

no test coverage detected