Horje
how to use event of Button in python Code Example
how to use event of Button in python
import tkinter as tk
root = tk.Tk()
root.geometry("400x400")
frame = tk.Frame()
frame.master.title("UI PNC")
def XL(event):
    print("Position:", event.x,event.y)
canvas=tk.Canvas(frame)
canvas.create_rectangle(20,20,200,200,fill="red",tags="UI")
canvas.tag_bind("UI","<Button-3>",XL)
canvas.pack(expand=True, fill="both")
frame.pack(expand=True, fill="both")
root.mainloop()




Python

Related
Subtract layers Code Example Subtract layers Code Example
if a specific column name is present drop tyhe column Code Example if a specific column name is present drop tyhe column Code Example
python code for calculating probability of random variable Code Example python code for calculating probability of random variable Code Example
Changing default fonts in matploitlibrc file Code Example Changing default fonts in matploitlibrc file Code Example
transform dictionary keys python Code Example transform dictionary keys python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9