I am trying to make it so that the "Add Next Set" button displays the entered data in the textbox. Like for example:
The next step would be to apply the data from each previous entry and insert the data into the textbox with this ideal format. As show in the example.
Any tips on how to format the data in the textbox?
Here is some code for context:
def insert_into_textbox(): #generates input fields for the next set of items
#get the inputs
handling_unit = e3.get()
pieces = e4.get()
description = e5.get()
length = e6.get()
width = e7.get()
height = e8.get()
weight = e9.get()
classification = e10.get()
textbox_display = (handling_unit+" "+pieces+" "+description+" "+length+" "+width+" "+height+" "+weight+" "+classification)
textbox.insert("end",textbox_display)
e3.delete(0, "end")
e4.delete(0, "end")
e5.delete(0, "end")
e6.delete(0, "end")
e7.delete(0, "end")
e8.delete(0, "end")
e9.delete(0, "end")
e10.delete(0, "end")
e1 = Entry(master, borderwidth=5, width=12) #origin zip
e2 = Entry(master, borderwidth=5, width=12) #destination zip
e3 = Entry(master, borderwidth=5, width=12) #handling unit(s)
e4 = Entry(master, borderwidth=5, width=12) #piece(s)
e5 = Entry(master, borderwidth=5, width=13) #description(s)
e6 = Entry(master, borderwidth=5, width=12) #length(s)
e7 = Entry(master, borderwidth=5, width=12) #width(s)
e8 = Entry(master, borderwidth=5, width=12) #height(s)
e9 = Entry(master, borderwidth=5, width=12) #weight(s)
e10 = Entry(master, borderwidth=5, width=12) #class(s)
textbox=Text(master, width=9, borderwidth=5, height=7)
textbox.grid(row=5, column=1, columnspan=9, sticky="nsew")
b0 = Button(master, text = "Add Next Set", bg="white", fg="black", font=arial8, command=insert_into_textbox)
mainloop()
Here is the output
How to properly format the display to match the ideal example in picture 2?