Hi,
I'm working on Python 2.4 and use tkinter to build my GUI.
I want to display content(line) from the listbox only when it is selected.
def get_list(event):
# get selected line index
index = Listbox.curselection()[0]
# get the line's text
seltext = Listbox.get(index)
print seltext
Listbox.bind('<ButtonRelease-1>', get_list)
This is the code I'm using but it's not working. Can you tell me why? I don't know if the mouse click is not getting sensed at all or I am not writing this function at the right location or the code itself is wrong.
Thanks