Hi, you said my click event grabs text and doesn't show it. So how do get it to show on the Text widget? So that when i clicked on item 1, 1.txt shows on the Text widget. I can't connect click event to Text widget
from Tkinter import * root = Tk() root.title("Renkontoj kun Diferenculoj") root.iconbitmap(r"C:\python27\DLLs/py.ico") root.resizable(0, 0) frame1 = LabelFrame(root, height=300, width=400, text='Lecionoj') frame2 = LabelFrame(root, height=300, width=400, text='Tekstoj') frame1.grid(row=0, column=0) frame2.grid(row=0, column=1) def click(event): index = list.curselection()[0] file = open(r"C:\Users\deadmarshal\PycharmProjects\ali\1.txt").read() list = Listbox(frame1) list.insert(1, "Konatiĝu kun Kamila") list.insert(2, "Sinjoro Johano") list.insert(3, "Onklino Marta") scroll = Scrollbar(frame1, orient=VERTICAL, command=list.yview) scroll.grid(row=0, column=2, sticky='ns') list.grid(row=0, column=1) list.bind("<ButtonRelease-1>", click) text = Text(frame2).grid() root.mainloop() _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor