Canvas in Tkinter: This will learn from original tkiter documentation Events in Tkinter: Events are used to handle anything in a gui window the syntax of event is syntax = name of widget.bind('name of events',name of function to be called) example: ******************** b = Label(text='hello') b.pack() def hel(event): print('yes') b.bind('<Button-1>',hel) **************** Events: <Button-1> Button 1 is the leftmost button, button 2 is the middle button (where available), and button 3 the rightmost button. <Button-1>, <ButtonPress-1>, and <1> are all synonyms. For mouse wheel support under Linux, use Button-4 (scroll up) and Button-5 (scroll down) <B1-Motion> The mouse is moved, with mouse button 1 being held down (use B2 for the middle button, B3 for the right button). <ButtonRelease-1> Button 1 was rele...
Comments
Post a Comment