Python Version 3.13 Textbox with the current date

Python Version 3.13 Textbox with the current date

If you want to have a text-box with the current date, then you can do it with this little script:

from tkinter import Tk, Text
from tkinter import messagebox
from datetime import datetime
current_date = datetime.now().strftime("%d.%m.%Y")

def news_date():
    message.box(current_date)

root = Tk()
root.resizable(False, False)
root.title(current_date)


text = Text(root, height=8)
text.pack()
root.mainloop()

Then you can see it here:

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

78 − = 72