Я пытаюсь сделать так, чтобы кнопка «Добавить следующий набор» отображала введенные данные в текстовом поле. Как например:
![display_example](https://i.stack.imgur.com/mRSbf.png)
Следующим шагом будет применение данных из каждой предыдущей записи и вставка данных в текстовое поле в этом идеальном формате. Как показано в примере.
![display_example2](https://i.stack.imgur.com/IFBfv.png)
Какие-либо советы по форматированию данных в текстовом поле?
Вот некоторый код для контекста:
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()
Вот вывод
![ui4](https://i.stack.imgur.com/ZgG5C.png)
Как правильно отформатировать дисплей в соответствии с идеальным примером на рисунке 2?