Skip to content Skip to sidebar Skip to footer

Tkinter Canvas Create_text Size (python3)

I understand that it is possible to get the size of text on a canvas: t = canvas.create_text(x, y, text='Hello StackOverflow') print(canvas.bbox(t)) but I want to decide where to

Solution 1:

A possible solution is

tk.font.Font(size=9, family='Helvetica').measure('HelloStackoverflow')

Post a Comment for "Tkinter Canvas Create_text Size (python3)"