0

Is there an option for the information from the treeview to be stored in the variables through a loop?

v0 = StringVar()
v1 = StringVar()
v2 = StringVar()
v3 = StringVar()
v4 = StringVar()

def getrow(event):
    #rowid = trv.identify_row(event.y)
    item = trv.item(trv.focus())
    v0.set(item['values'][0])
    v1.set(item['values'][1])
    v2.set(item['values'][2])
    v3.set(item['values'][3])
    v4.set(item['values'][4])
  • Does this answer your question? [How can I use a for loop to iterate through numbered variables?](https://stackoverflow.com/questions/33153564/how-can-i-use-a-for-loop-to-iterate-through-numbered-variables) – mkrieger1 Aug 04 '21 at 09:08

0 Answers0