layout improvement with ipadxy and padxy

This commit is contained in:
julian 2024-03-23 16:26:47 +01:00
parent 6d878b3761
commit 4122ddeb6a

View File

@ -60,17 +60,17 @@ journal.pack(pady=100, side=tk.TOP)
# #
# name # name
name_label = ttk.Label(journal, text = "Dein Name:") name_label = ttk.Label(journal, text = "Dein Name:")
name_label.grid(sticky = 'w', column = 0, row = 0) name_label.grid(sticky = 'w', column = 0, row = 0, padx = 5, pady = 5)
name_entry = ttk.Entry(journal, textvariable = name) name_entry = ttk.Entry(journal, textvariable = name)
name_entry.grid(sticky = 'n', column = 0, row = 0, rowspan = True) name_entry.grid(sticky = 'n', column = 0, row = 0, padx = 5, pady = 5)
name_entry.focus() name_entry.focus()
# #
# textbox # textbox
message_label = tk.Label(journal, text = "Deine Nachricht:") message_label = tk.Label(journal, text = "Deine Nachricht:")
message_label.grid(column = 0, row = 1, rowspan = True) message_label.grid(column = 0, row = 1, sticky = 'w', padx = 5)
message_text = tk.Text(journal, height = 50) message_text = tk.Text(journal, height = 50)
message_text.grid(column = 0, row = 2) message_text.grid(column = 0, row = 2, padx = 5)
def send_button_clicked(): def send_button_clicked():
@ -96,7 +96,7 @@ button_send = ttk.Button(
text = "Abschicken", text = "Abschicken",
command = lambda: send_button_clicked() command = lambda: send_button_clicked()
) )
button_send.grid(sticky = 'n', column = 0, row = 3) button_send.grid(sticky = 'w', column = 0, row = 3, ipady = 8, padx = 5, pady = 5)
# #
@ -106,6 +106,6 @@ button_quit = ttk.Button(
text = "Speichern und Beenden", text = "Speichern und Beenden",
command = lambda: save_and_quit_button_clicked() command = lambda: save_and_quit_button_clicked()
) )
button_quit.grid(sticky = 'n', column = 0, row = 4) button_quit.grid(sticky = 'e', column = 0, row = 3, ipady = 8, padx = 5, pady = 5)
journal.mainloop() journal.mainloop()