size/coordinates of wrapped text object in tkinter Canvas
问题 How do I get coordinates of a wrapped text object in Tkinter Canvas? I know I can use canvas.bbox(text_object) but it will give me only box coordinates. But if the text is wrapped I need to get coordinates of last char in the last line. I want to put a polygon under text so as to make background color for text only. I got this using canvas.bbox(text_object) I want it to be like this : 回答1: You can use canvas.find_overlapping(x, y, x+1, y+1) to find the boundaries of your text: import tkinter