In my GUI, I have a lot of Entry boxes. Most of them are used for large numbers and I want to use comma separation. Using my code I am able to do so but the cursor moves right automatically. When a comma is inserted automatically. How to keep this cursor fixed at the extreme right, or there is any suggestion to change my code.
from tkinter import *
import locale
root = Tk()
a = StringVar()
b = Entry(root, textvariable = a, justify = RIGHT).pack()
def secod(*events):
ray = a.get()
raym = ray.replace(",",'')
raymond = int(raym)
try:
asd = format(raymond,',')
except:
print("b")
a.set(asd)
a.trace('w',secod)
root.mainloop()