position stuff cia .grid() instead of .pack()
This commit is contained in:
parent
5ffc4e647b
commit
6d878b3761
15
journal.py
15
journal.py
|
|
@ -55,22 +55,22 @@ message = tk.StringVar()
|
||||||
#
|
#
|
||||||
# Main Window
|
# Main Window
|
||||||
journal = ttk.Frame(journal)
|
journal = ttk.Frame(journal)
|
||||||
journal.pack()
|
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.pack(fill = 'x', expand = True)
|
name_label.grid(sticky = 'w', column = 0, row = 0)
|
||||||
name_entry = ttk.Entry(journal, textvariable = name)
|
name_entry = ttk.Entry(journal, textvariable = name)
|
||||||
name_entry.pack(fill = 'x', expand = True)
|
name_entry.grid(sticky = 'n', column = 0, row = 0, rowspan = True)
|
||||||
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.pack(fill = 'x', expand = True)
|
message_label.grid(column = 0, row = 1, rowspan = True)
|
||||||
message_text = tk.Text(journal, height = 50)
|
message_text = tk.Text(journal, height = 50)
|
||||||
message_text.pack()
|
message_text.grid(column = 0, row = 2)
|
||||||
|
|
||||||
|
|
||||||
def send_button_clicked():
|
def send_button_clicked():
|
||||||
|
|
@ -96,7 +96,8 @@ button_send = ttk.Button(
|
||||||
text = "Abschicken",
|
text = "Abschicken",
|
||||||
command = lambda: send_button_clicked()
|
command = lambda: send_button_clicked()
|
||||||
)
|
)
|
||||||
button_send.pack(pady = 15, padx = 15)
|
button_send.grid(sticky = 'n', column = 0, row = 3)
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Quit Button
|
# Quit Button
|
||||||
|
|
@ -105,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.pack()
|
button_quit.grid(sticky = 'n', column = 0, row = 4)
|
||||||
|
|
||||||
journal.mainloop()
|
journal.mainloop()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user