I'm trying to bind the items in my listbox to mouse button number 1 so that when i press it it prints "hi". However whenever i try to do it the code simply won't work. What happens is when i launch the program it will print "hi" once and then never again no matter how many times i click on the mouse button 1. Any suggestions? Thanks
from tkinter import *
class Applikation(Frame):
def __init__(self, master):
Frame.__init__(self,master)
self.master=master
self.rssList = Listbox(self.master, height=30, width=50)
self.rssList.grid(row=1, column=0, rowspan=4, padx=10, pady=20)
self.rssList.bind("<Button-1>", print("hi"))
rssReader = Tk()
rssReader.title("Rss reader")
rssReader.resizable(10, 10)
app = Applikation(rssReader).grid()
rssReader.mainloop()