I have made a list of names and everytime i want to select a value in the listbox it should give me a result in the Entry box can someone please help me.
This is my listbox values
musicfolder = [
["CollegeRock/"],
['RnB/'],
['HipHop/'],
['Build/'],
['Buy/'],
['Techno/'],
['Jazz/'],
['Classic/']
]
this is the code i used to get the value and to display it in the Entrybox
#get selected line index
index = lb.curselection()[0]
#print index
seltext = lb.get(index)
#get the line's text
seltext = lb.get(index)
#now display the selecred text
E2.insert(0,seltext)
This is the error I recieve
Traceback (most recent call last):
File "C:\Documents and Settings\stage1\Desktop\List\List.py", line 88, in -toplevel-
index = lb.curselection()[0]
IndexError: tuple index out of range