I am making Checkers and am using an asterisk to mark the kings. I need the asterisk to be centered in the middle of the canvas. I made this example to show what's going wrong:
from tkinter import *
class MyCanvas(Canvas):
def __init__(self,master):
Canvas.__init__(self,master,width=100,height=100,bg='blue')
self.grid()
def add_asterisk(self):
self.create_text(50,50,text="*",fill="black",font=('Arial',80),anchor='center')
root = Tk()
root.title('Example')
myCanvas = MyCanvas(root)
myCanvas.add_asterisk()
myCanvas.mainloop()
The asterisk looks like it's centered on the horizantal axis, but it is too high on the vertical one. I'm placing it at (50,50), since the canvas is 100x100. Thanks in advance!


