I am trying to create a simple table using Tkinter. However the label and the text widgets do not align horizontally. This is for example my Line_number label :
Line_Number_label = Label(Frame_Label_Menu, text="N°", anchor="w", bg="#ffffff", width=3)
Line_Number_label.grid(column=0, row=0, sticky=E+W)
This is my text label, which gets the value entered by the user in an entry field:
Text0 = Text(Frame_Text, height=1, width=3)
Text0.grid(column=0, row=Line_number, sticky=E+W)
Text0.insert("end", Line_number)
The winfo.width() function returns a length of 30 pixels on Line_Number_label and of 25 pixels on Text0. I gave all widgets the same police and the same size:
root.option_add("*Font", "Roboto 10")
For some reason the width of the label widgets is always slightly longer than the text widgets:
Label widgets do not seem to set their dimensions ("width") on the number of characters as text widgets do. Or am I doing something wrong ?