diff --git a/journal.py b/journal.py index b273baa..056076d 100755 --- a/journal.py +++ b/journal.py @@ -37,43 +37,42 @@ journal = ttk.Frame(journal) journal.pack() # name -name_label = ttk.Label(journal, text="Dein Name:") -name_label.pack(fill='x', expand=True) -name_entry = ttk.Entry(journal, textvariable=name) -name_entry.pack(fill='x', expand=True) +name_label = ttk.Label(journal, text = "Dein Name:") +name_label.pack(fill = 'x', expand = True) +name_entry = ttk.Entry(journal, textvariable = name) +name_entry.pack(fill = 'x', expand = True) name_entry.focus() # textbox -message_label = tk.Label(journal, text="Deine Nachricht:") -message_label.pack(fill='x', expand=True) -#message_text = ttk.Text(journal, height=50) -message_text = tk.Text(journal) +message_label = tk.Label(journal, text = "Deine Nachricht:") +message_label.pack(fill = 'x', expand = True) +#message_text = ttk.Text(journal, height = 50) +message_text = tk.Text(journal, height = 50) message_text.pack() def send_button_clicked(): with open(journal_filename_path, "a") as journal_of_the_day: journal_of_the_day.write(name.get() + "\n") - message_text_str=message_text.get() - journal_of_the_day.write(message_text_str + "\n") + journal_of_the_day.write(message_text.get() + "\n") journal_of_the_day.write("-----------------\n") - showinfo(title="Information", message="Deine Nachricht wurde gespeichert") + showinfo(title = "Information", message = "Deine Nachricht wurde gespeichert") # Send Button button_send = ttk.Button( journal, - text="Abschicken", - # command=lambda: showinfo(title="Information", message="Deine Nachricht wurde gespeichert") - command=lambda: send_button_clicked() + text = "Abschicken", + # command = lambda: showinfo(title = "Information", message = "Deine Nachricht wurde gespeichert") + command = lambda: send_button_clicked() ) button_send.pack() # Quit Button button_quit = ttk.Button( journal, - text="Speichern und Beenden", - command=lambda: journal.quit() + text = "Speichern und Beenden", + command = lambda: journal.quit() ) button_quit.pack()