Tkinter Title ändern
Verfasst: Sonntag 25. Mai 2014, 19:10
Ich möchte gerne den title von meinem tkinter Canvas GUI ändern.
Ich habe nur lösungen gefunden dir nicht gehen. :K
Ich habe nur lösungen gefunden dir nicht gehen. :K
Seit 2002 Diskussionen rund um die Programmiersprache Python
https://www.python-forum.de/
Code: Alles auswählen
try:
# Python2
import Tkinter as tk
except ImportError:
# Python3
import tkinter as tk
def clicked():
# change the window title
root.title("Button1 clicked")
# one way to originally set the window title
root = tk.Tk(className="My Title")
root.geometry("300x120+200+50")
tk.Button(root, text="click on Button1", command=clicked).pack()
root.mainloop()