MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / toc_menu

Method toc_menu

tools/python-3.11.9-amd64/Lib/idlelib/help.py:228–235  ·  view source on GitHub ↗

Create table of contents as drop-down menu.

(self, text)

Source from the content-addressed store, hash-verified

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