Skip to content

Commit c47cc3b

Browse files
Convert to buttons
1 parent 4ca9fc0 commit c47cc3b

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

Lib/idlelib/help_about.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,21 @@ 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+
info_buttons = Frame(frame_background, bg=self.bg)
91+
info_buttons.grid(row=3, column=0, columnspan=1, sticky=NSEW)
92+
forums = Button(info_buttons, text='Python Discuss', width=35,
93+
highlightbackground=self.bg,
94+
command=lambda: webbrowser.open(forums_url))
95+
forums.grid(row=3, column=0, sticky=W, padx=10, pady=10)
96+
97+
9498
docs_url = ("https://docs.python.org/%d.%d/library/idle.html" %
9599
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))
100+
docs = Button(info_buttons, text='Python Documentation', width=35,
101+
highlightbackground=self.bg,
102+
command=lambda: webbrowser.open(docs_url))
103+
docs.grid(row=4, column=0, columnspan=2, sticky=W, padx=10, pady=10)
104+
100105

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

0 commit comments

Comments
 (0)