import Tkinter as tk

def showxy(event):
    xm, ym = event.x, event.y
    str1 = % (xm, ym)
    
    root.title(str1)
    
    x,y, delta = 100, 100, 10
    frame.config(bg='red'
                 if abs(xm - x) < delta and abs(ym - y) < delta
                 else 'yellow')

root = tk.Tk()
frame = tk.Frame(root, bg= 'yellow', width=300, height=200)
frame.bind(, showxy)
frame.pack()

root.mainloop()