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

Method toc_menu

Lib/idlelib/help.py:229–236  ·  view source on GitHub ↗

Create table of contents as drop-down menu.

(self, text)

Source from the content-addressed store, hash-verified

227 scroll.grid(row=0, column=2, sticky='ns')
228
229 def toc_menu(self, text):
230 "Create table of contents as drop-down menu."
231 toc = Menubutton(self, text='TOC')
232 drop = Menu(toc, tearoff=False)
233 for lbl, dex in text.parser.toc:
234 drop.add_command(label=lbl, command=lambda dex=dex:text.yview(dex))
235 toc['menu'] = drop
236 return toc
237
238
239class HelpWindow(Toplevel):

Callers 1

__init__Method · 0.95

Calls 4

add_commandMethod · 0.95
MenubuttonClass · 0.90
MenuClass · 0.90
yviewMethod · 0.45

Tested by

no test coverage detected