(parent)
| 514 | |
| 515 | |
| 516 | def _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 | |
| 538 | if __name__ == '__main__': |
nothing calls this directly
no test coverage detected
searching dependent graphs…