Skip to content

Commit ed831b9

Browse files
gh-69001: Convert links to more usable buttons (#129591)
In Lib/idlelib/help_about.py, there are 2 links that are not underlined or colored, hence hard to tell that clicking works. All buttons might get converted to colored and underlined links in the future. --------- Co-authored-by: Terry Jan Reedy <[email protected]>
1 parent 47ace53 commit ed831b9

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

Lib/idlelib/help_about.py

+11-8
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,19 @@ def create_widgets(self):
8787
byline.grid(row=2, column=0, sticky=W, columnspan=3, padx=10, pady=5)
8888

8989
forums_url = "https://discuss.python.org"
90-
forums = Label(frame_background, text="Python forums: "+forums_url,
91-
justify=LEFT, fg=self.fg, bg=self.bg)
92-
forums.grid(row=6, column=0, sticky=W, padx=10, pady=0)
93-
forums.bind("<Button-1>", lambda event: webbrowser.open(forums_url))
90+
forums = Button(frame_background, text='Python (and IDLE) Discussion', width=35,
91+
highlightbackground=self.bg,
92+
command=lambda: webbrowser.open(forums_url))
93+
forums.grid(row=6, column=0, sticky=W, padx=10, pady=10)
94+
95+
9496
docs_url = ("https://docs.python.org/%d.%d/library/idle.html" %
9597
sys.version_info[:2])
96-
docs = Label(frame_background, text=docs_url,
97-
justify=LEFT, fg=self.fg, bg=self.bg)
98-
docs.grid(row=7, column=0, columnspan=2, sticky=W, padx=10, pady=0)
99-
docs.bind("<Button-1>", lambda event: webbrowser.open(docs_url))
98+
docs = Button(frame_background, text='IDLE Documentation', width=35,
99+
highlightbackground=self.bg,
100+
command=lambda: webbrowser.open(docs_url))
101+
docs.grid(row=7, column=0, columnspan=2, sticky=W, padx=10, pady=10)
102+
100103

101104
Frame(frame_background, borderwidth=1, relief=SUNKEN,
102105
height=2, bg=self.bg).grid(row=8, column=0, sticky=EW,

0 commit comments

Comments
 (0)