When I return values to a set of text fields and expect the same set of entries to display in the corresponding buttons,am only able to return the last entered text value into all the buttons using Tkinter python 3. How to get the corresponding text values in the corresponding button fields? This is the respective code for it.
def inputt(self):
x = int(self.number.get())
entries_list=[]
path_list=[]
button_list=[]
label_list=[]
button_1_list=[]
for i in range(0,x):
l = Label(root,text="Device "+str(i+1)+":")
l.grid(row=i+5,column=0)
label_list.append(l)
self.e = Entry(root)
self.e.grid(row=i+5,column=1)
entries_list.append(self.e)
b1 = Button(root,text="Next",command=lambda:load(self,self.inputt))
b1.grid(row=i+6,column=0)
def load(self, inputt):
for i in range(0,x):
b3=Button(root, text=self.e[i].get())
b3.grid(row=i+100,column=0)
button_list.append(b3)
For the given text entries,I want to return the values to Def(load)
function's buttons.