Skip to content

Commit f3efa33

Browse files
authoredApr 30, 2024
Create TitleTesting.py
1 parent 580e619 commit f3efa33

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
 

‎TitleTesting.py

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import tkinter
2+
3+
# Note: This application is not intended to be taken seriously and is expressly intended as a demonstration for changing Tkinter window titles.
4+
5+
root = tkinter.Tk()
6+
7+
def tkA():
8+
root.configure(text="Test Window")
9+
10+
def tkB():
11+
root.configure(text="Demo Window")
12+
13+
def tkC():
14+
root.configure(text="Support")
15+
16+
def tkD():
17+
root.configure(text="Dictionary")
18+
19+
def tkE():
20+
root.configure(text="Documentation")
21+
22+
def tkF():
23+
root.configure(text="Editor")
24+
25+
def tkG():
26+
root.configure(text="Photo Editor")
27+
28+
def tkH():
29+
root.configure(text="Workstation")
30+
31+
32+
buttonA = tkinter.Button(root, text="Change to Test Window", command=tkA)
33+
buttonA.pack()
34+
buttonB = tkinter.Button(root, text="Change to Demo Window", command=tkB)
35+
buttonB.pack()
36+
buttonC = tkinter.Button(root, text="Change to Support", command=tkC)
37+
buttonC.pack()
38+
buttonD = tkinter.Button(root, text="Change to Dictionary", command=tkD)
39+
buttonD.pack()
40+
buttonE = tkinter.Button(root, text="Change to Documentation", command=tkE)
41+
buttonE.pack()
42+
buttonF = tkinter.Button(root, text="Change to Editor", command=tkF)
43+
buttonF.pack()
44+
buttonG = tkinter.Button(root, text="Change to Photo Editor", command=tkG)
45+
buttonG.pack()
46+
buttonH = tkinter.Button(root, text="Change to Workstation", command=tkH)
47+
buttonH.pack()
48+
root.mainloop()

0 commit comments

Comments
 (0)