Skip to content

Commit

Permalink
gh-120633: Move scrollbar and remove tear-off menus in turtledemo (#1…
Browse files Browse the repository at this point in the history
…20634)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
  • Loading branch information
Wulian233 and terryjreedy committed Jun 19, 2024
1 parent a0dce37 commit 89f7208
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Lib/turtledemo/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def makeTextFrame(self, root):

self.vbar = vbar = Scrollbar(text_frame, name='vbar')
vbar['command'] = text.yview
vbar.pack(side=LEFT, fill=Y)
vbar.pack(side=RIGHT, fill=Y)
self.hbar = hbar = Scrollbar(text_frame, name='hbar', orient=HORIZONTAL)
hbar['command'] = text.xview
hbar.pack(side=BOTTOM, fill=X)
Expand Down Expand Up @@ -292,7 +292,7 @@ def configGUI(self, start, stop, clear, txt="", color="blue"):
self.output_lbl.config(text=txt, fg=color)

def makeLoadDemoMenu(self, master):
menu = Menu(master)
menu = Menu(master, tearoff=1) # TJR: leave this one.

for entry in getExampleEntries():
def load(entry=entry):
Expand All @@ -302,7 +302,7 @@ def load(entry=entry):
return menu

def makeFontMenu(self, master):
menu = Menu(master)
menu = Menu(master, tearoff=0)
menu.add_command(label="Decrease (C-'-')", command=self.decrease_size,
font=menufont)
menu.add_command(label="Increase (C-'+')", command=self.increase_size,
Expand All @@ -317,7 +317,7 @@ def resize(size=size):
return menu

def makeHelpMenu(self, master):
menu = Menu(master)
menu = Menu(master, tearoff=0)

for help_label, help_file in help_entries:
def show(help_label=help_label, help_file=help_file):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Move scrollbar and remove tear-off menus in turtledemo.

0 comments on commit 89f7208

Please sign in to comment.