I'm trying to build a simple GUI where there's a list of sentences, and there's a for loop with tkinter Text where these sentences are being displayed, I want the loop to iterate and show the next sentence from the list only when the button is clicked, how can I achieve this, thanks. I tried wait_variable but it's not working.
var = IntVar()
for entry in input_texts:
scroll = Scrollbar(canvas)
display = Text(canvas, height=2, width=110)
display.insert(INSERT, entry)
display.grid(row=1, sticky='w')
scroll.grid(row=1, column=4)
display.config(yscrollcommand=scroll.set)
scroll.config(command=display.yview)
confirm = Button(canvas, text=" NEXT ", command=pause)
confirm.grid(row=4, sticky='w')
confirm.wait_variable(var)
var.set(0)
canvas.resizable(width=False, height=False)
canvas.mainloop()