I'm creating a commands box which is made up of an entry widget and a text widget. When the user presses return on the entry widget the message is supposed to be pushed to the bottom of the text entry, instead it is pushed to the top. Not been able to find any implementations of this or any options to do it, any help would be appreciated.
Code example I'm working with:
from tkinter import *
window = Tk()
messages = Text(window)
messages.pack()
input_user = StringVar()
input_field = Entry(window, text=input_user)
input_field.pack(side=BOTTOM, fill=X)
def Enter_pressed(event):
input_get = input_field.get()
print(input_get)
messages.insert(INSERT, '%s\n' % input_get
input_user.set('')
return "break"
frame = Frame(window) # , width=300, height=300)
input_field.bind("<Return>", Enter_pressed)
frame.pack()
window.mainloop()
How it currently looks: CommandsGUI
Again, any help/suggestions would be appreciated