from tkinter import *
import datetime

def button_action():
    anweisungs_label.config(text="Ich wurde geändert!", bg="red")

def close_window():
    fenster.destroy()

def show_datetime():
    now = datetime.datetime.now()
    datetime_output.config(text="Aktuelles Datum und Uhrzeit:\n" + now.strftime("%Y-%m-%d %H:%M:%S"))

def show_inputs():
    eingabe_text = eingabe.get()
    ausgabe_text = ausgabe.get()
    print("Eingabe:", eingabe_text)
    print("Ausgabe:", ausgabe_text)

def reset_inputs():
    eingabe.delete(0, END)
    ausgabe.delete(0, END)
    anweisungs_label.config(text="Ich bin eine Anweisung:\nKlicke auf 'Ändern'.", bg="yellow", fg="black")
    ausgabe.insert(END,"TEXTVORBELEGUNG")
    datetime_output.config(text=" ")

fenster = Tk()
fenster.title("Ich mache nun was.")
fenster.configure(bg="lightgray")

change_button = Button(fenster, text="Ändern", command=button_action, bg="green", fg="white")
exit_button = Button(fenster, text="Beenden", command=close_window, bg="red", fg="white")
datetime_button = Button(fenster, text="Aktuelle Datum/Uhrzeit anzeigen", command=show_datetime)
show_inputs_button = Button(fenster, text="Eingaben anzeigen", command=show_inputs)
reset_button = Button(fenster, text="Reset", command=reset_inputs)

anweisungs_label = Label(fenster, text="Ich bin eine Anweisung:\nKlicke auf 'Ändern'.", bg="yellow", fg="black")
info_label = Label(fenster, text="Ich bin eine Info:\nDer Beenden Button schließt das Programm.", bg="blue", fg="white")
datetime_output = Label(fenster, text="", bg="lightblue", fg="black")
vorbel="VORBELEGUNG"
eingabe = Entry(fenster)
#ausgabe = Entry(fenster,show="*") #passwort
ausgabe = Entry(fenster)
ausgabe.insert(END,"TEXTVORBELEGUNG")

fenster.geometry("450x380")

anweisungs_label.place(x=0, y=0, width=200, height=30)
change_button.place(x=220, y=0, width=200, height=30)
info_label.place(x=100, y=40, width=300, height=30)
exit_button.place(x=100, y=80, width=300, height=30)
eingabe.place(x=100, y=120, width=250, height=30)
ausgabe.place(x=100, y=160, width=250, height=30)
datetime_button.place(x=100, y=200, width=250, height=30)
datetime_output.place(x=100, y=240, width=250, height=50)
show_inputs_button.place(x=100, y=300, width=250, height=30)
reset_button.place(x=100, y=340, width=250, height=30)

fenster.mainloop()
