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

Method __init__

tools/python-3.11.9-amd64/Lib/idlelib/help.py:212–226  ·  view source on GitHub ↗
(self, parent, filename)

Source from the content-addressed store, hash-verified

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

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