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

Method __init__

Lib/idlelib/help.py:213–227  ·  view source on GitHub ↗
(self, parent, filename)

Source from the content-addressed store, hash-verified

211class HelpFrame(Frame):
212 "Display html text, scrollbar, and toc."
213 def __init__(self, parent, filename):
214 Frame.__init__(self, parent)
215 self.text = text = HelpText(self, filename)
216 self.style = Style(parent)
217 self['style'] = 'helpframe.TFrame'
218 self.style.configure('helpframe.TFrame', background=text['background'])
219 self.toc = toc = self.toc_menu(text)
220 self.scroll = scroll = Scrollbar(self, command=text.yview)
221 text['yscrollcommand'] = scroll.set
222
223 self.rowconfigure(0, weight=1)
224 self.columnconfigure(1, weight=1) # Only expand the text widget.
225 toc.grid(row=0, column=0, sticky='nw')
226 text.grid(row=0, column=1, sticky='nsew')
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."

Callers

nothing calls this directly

Calls 7

toc_menuMethod · 0.95
StyleClass · 0.90
ScrollbarClass · 0.90
HelpTextClass · 0.85
__init__Method · 0.45
configureMethod · 0.45
gridMethod · 0.45

Tested by

no test coverage detected