# Import all files from# tkinter and overwrite# all the tkinter files# by tkinter.ttkfromtkinterimport*fromtkinter.ttkimport*# creates tkinter window or root windowroot=Tk()root.geometry('200x100')# function to be called when button-2 of mouse is presseddefpressed2(event):print('Button-2 pressed at x =% d, y =% d'%(event.x,event.y))# function to be called when button-3 of mouse is presseddefpressed3(event):print('Button-3 pressed at x =% d, y =% d'%(event.x,event.y))## function to be called when button-1 is double clockeddefdouble_click(event):print('Double clicked at x =% d, y =% d'%(event.x,event.y))frame1=Frame(root,height=100,width=200)# these lines are binding mouse# buttons with the Frame widgetframe1.bind('<Button-2>',pressed2)frame1.bind('<Button-3>',pressed3)frame1.bind('<Double 1>',double_click)frame1.pack()mainloop()