From fcdabcc2e7141dc6173b377e1adace3505793c37 Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 15 Jan 2024 20:37:48 +0100 Subject: [PATCH] Speichern und Beenden Button, aber speichert noch nicht. Beendet nur. --- journal.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/journal.py b/journal.py index 14d985e..266f9ae 100755 --- a/journal.py +++ b/journal.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import tkinter as tk from tkinter import ttk @@ -34,11 +34,19 @@ message_text = tk.Text(journal, height=50) message_text.pack() # Send Button -button = ttk.Button( +button_send = ttk.Button( journal, text="Abschicken", command=lambda: showinfo(title="Information", message="Deine Nachricht wurde gespeichert") ) -button.pack() +button_send.pack() + +# Quit Button +button_quit = ttk.Button( + journal, + text="Speichern und Beenden", + command=lambda: journal.quit() +) +button_quit.pack() journal.mainloop() \ No newline at end of file