gh-120633: Move scrollbar and remove tear-off menus in turtledemo (#120634)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
Wulian233 2024-06-19 14:20:54 +08:00 committed by GitHub
parent a0dce37895
commit 89f7208f67
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View File

@ -216,7 +216,7 @@ class DemoWindow(object):
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)
@ -292,7 +292,7 @@ class DemoWindow(object):
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):
@ -302,7 +302,7 @@ class DemoWindow(object):
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,
@ -317,7 +317,7 @@ class DemoWindow(object):
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):

View File

@ -0,0 +1 @@
Move scrollbar and remove tear-off menus in turtledemo.