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

Function _sidebar_number_scrolling

Lib/idlelib/sidebar.py:516–535  ·  view source on GitHub ↗
(parent)

Source from the content-addressed store, hash-verified

514
515
516def _sidebar_number_scrolling(parent): # htest #
517 from idlelib.idle_test.test_sidebar import Dummy_editwin
518
519 top = tk.Toplevel(parent)
520 text_frame = tk.Frame(top)
521 text_frame.pack(side=tk.LEFT, fill=tk.BOTH, expand=True)
522 text_frame.rowconfigure(1, weight=1)
523 text_frame.columnconfigure(1, weight=1)
524
525 font = idleConf.GetFont(top, 'main', 'EditorWindow')
526 text = tk.Text(text_frame, width=80, height=24, wrap=tk.NONE, font=font)
527 text.grid(row=1, column=1, sticky=tk.NSEW)
528
529 editwin = Dummy_editwin(text)
530 editwin.vbar = tk.Scrollbar(text_frame)
531
532 linenumbers = LineNumbers(editwin)
533 linenumbers.show_sidebar()
534
535 text.insert('1.0', '\n'.join('a'*i for i in range(1, 101)))
536
537
538if __name__ == '__main__':

Callers

nothing calls this directly

Calls 8

insertMethod · 0.95
Dummy_editwinClass · 0.90
LineNumbersClass · 0.85
GetFontMethod · 0.80
show_sidebarMethod · 0.80
packMethod · 0.45
gridMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…