diff options
author | Steve Dower <steve.dower@microsoft.com> | 2017-02-06 14:12:19 -0800 |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2017-02-06 14:12:19 -0800 |
commit | 5b4df5813c20fe96f117d0201965b52e86a1a66d (patch) | |
tree | d991f61bc824ca1b1b92bf7fb16fe3dacd4b1335 /Lib/idlelib/help.py | |
parent | 3e0bdff8a0793d305b972f4a653e4698d440b3ae (diff) | |
parent | 95b272b4e0d5438a12702e51e05d03f5a5a8e505 (diff) | |
download | cpython-5b4df5813c20fe96f117d0201965b52e86a1a66d.tar.gz |
Includes ensurepip and venv packages in nuget package.
Diffstat (limited to 'Lib/idlelib/help.py')
-rw-r--r-- | Lib/idlelib/help.py | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/Lib/idlelib/help.py b/Lib/idlelib/help.py index a7008e94ed..77e01a31c0 100644 --- a/Lib/idlelib/help.py +++ b/Lib/idlelib/help.py @@ -4,7 +4,7 @@ Contents are subject to revision at any time, without notice. Help => About IDLE: diplay About Idle dialog -<to be moved here from aboutDialog.py> +<to be moved here from help_about.py> Help => IDLE Help: Display help.html with proper formatting. @@ -25,15 +25,14 @@ copy_strip - Copy idle.html to help.html, rstripping each line. show_idlehelp - Create HelpWindow. Called in EditorWindow.help_dialog. """ from html.parser import HTMLParser -from os.path import abspath, dirname, isdir, isfile, join +from os.path import abspath, dirname, isfile, join from platform import python_version -from tkinter import Tk, Toplevel, Frame, Text, Scrollbar, Menu, Menubutton + +from tkinter import Toplevel, Frame, Text, Menu +from tkinter.ttk import Menubutton, Scrollbar from tkinter import font as tkfont -from idlelib.configHandler import idleConf -use_ttk = False # until available to import -if use_ttk: - from tkinter.ttk import Menubutton +from idlelib.config import idleConf ## About IDLE ## @@ -197,15 +196,18 @@ class HelpFrame(Frame): "Display html text, scrollbar, and toc." def __init__(self, parent, filename): Frame.__init__(self, parent) - text = HelpText(self, filename) + # keep references to widgets for test access. + self.text = text = HelpText(self, filename) self['background'] = text['background'] - scroll = Scrollbar(self, command=text.yview) + self.toc = toc = self.toc_menu(text) + self.scroll = scroll = Scrollbar(self, command=text.yview) text['yscrollcommand'] = scroll.set + self.rowconfigure(0, weight=1) self.columnconfigure(1, weight=1) # text - self.toc_menu(text).grid(column=0, row=0, sticky='nw') - text.grid(column=1, row=0, sticky='nsew') - scroll.grid(column=2, row=0, sticky='ns') + toc.grid(row=0, column=0, sticky='nw') + text.grid(row=0, column=1, sticky='nsew') + scroll.grid(row=0, column=2, sticky='ns') def toc_menu(self, text): "Create table of contents as drop-down menu." |