mirror of https://github.com/python/cpython
[3.13] gh-120633: Move scrollbar and remove tear-off menus in turtledemo (GH-120634) (#120725)
gh-120633: Move scrollbar and remove tear-off menus in turtledemo (GH-120634)
(cherry picked from commit 89f7208f67
)
Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
parent
1b028117d1
commit
a22eb2f266
|
@ -218,7 +218,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)
|
||||
|
@ -294,7 +294,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):
|
||||
|
@ -304,7 +304,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,
|
||||
|
@ -319,7 +319,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):
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Move scrollbar and remove tear-off menus in turtledemo.
|
Loading…
Reference in New Issue