django2/demo/app/basic.py
Peter Kotyczka 679d7d1b58 smc
2024-03-24 22:58:33 +01:00

47 lines
918 B
Python
Executable File

import tkinter as tk
window = tk.Tk()
label = tk.Label(
text="Python rocks!",
foreground="white", # Set the text color to white
background="black" # Set the background color to black
)
border_effects = {
"flat": tk.FLAT,
"sunken": tk.SUNKEN,
"raised": tk.RAISED,
"groove": tk.GROOVE,
"ridge": tk.RIDGE,
}
for relief_name, relief in border_effects.items():
frame = tk.Frame(master=window, relief=relief, borderwidth=5)
frame.pack(side=tk.LEFT)
label = tk.Label(master=frame, text=relief_name)
label.pack()
label.pack()
entry = tk.Entry()
entry.pack()
name = entry.get()
frame_a = tk.Frame()
label_a = tk.Label(master=frame_a, text="Personalliste")
label_a.pack()
frame_a.pack()
text_box = tk.Text()
text_box.pack()
frame_b = tk.Frame()
label_b = tk.Label(master=frame_b, text="I'm in Frame B")
label_b.pack()
frame_b.pack()
window.mainloop()
print(name)