Skip to content

Commit a22eb2f

Browse files
miss-islingtonWulian233terryjreedy
authored
[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 89f7208) Co-authored-by: Wulian233 <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]>
1 parent 1b02811 commit a22eb2f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Lib/turtledemo/__main__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def makeTextFrame(self, root):
218218

219219
self.vbar = vbar = Scrollbar(text_frame, name='vbar')
220220
vbar['command'] = text.yview
221-
vbar.pack(side=LEFT, fill=Y)
221+
vbar.pack(side=RIGHT, fill=Y)
222222
self.hbar = hbar = Scrollbar(text_frame, name='hbar', orient=HORIZONTAL)
223223
hbar['command'] = text.xview
224224
hbar.pack(side=BOTTOM, fill=X)
@@ -294,7 +294,7 @@ def configGUI(self, start, stop, clear, txt="", color="blue"):
294294
self.output_lbl.config(text=txt, fg=color)
295295

296296
def makeLoadDemoMenu(self, master):
297-
menu = Menu(master)
297+
menu = Menu(master, tearoff=1) # TJR: leave this one.
298298

299299
for entry in getExampleEntries():
300300
def load(entry=entry):
@@ -304,7 +304,7 @@ def load(entry=entry):
304304
return menu
305305

306306
def makeFontMenu(self, master):
307-
menu = Menu(master)
307+
menu = Menu(master, tearoff=0)
308308
menu.add_command(label="Decrease (C-'-')", command=self.decrease_size,
309309
font=menufont)
310310
menu.add_command(label="Increase (C-'+')", command=self.increase_size,
@@ -319,7 +319,7 @@ def resize(size=size):
319319
return menu
320320

321321
def makeHelpMenu(self, master):
322-
menu = Menu(master)
322+
menu = Menu(master, tearoff=0)
323323

324324
for help_label, help_file in help_entries:
325325
def show(help_label=help_label, help_file=help_file):
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Move scrollbar and remove tear-off menus in turtledemo.

0 commit comments

Comments
 (0)