I have a function that creates me a label and and entry
#creates an entry
def create_entry(l_text,l_col, e_size,data_name):
l_name=ttk.Label(data_frame,text=l_text, justify="left", width=len(l_text)) # create a label first
l_name.grid(row=row_nr,column=l_col,padx=pad_x,pady=pad_y) # define position
e_name=ttk.Entry(data_frame,width=e_size,justify="left") # create the entry
e_name.grid(row=row_nr,column=l_col+1,padx=pad_x,pady=pad_y) # define position
data_name = e_name.get() # add e_name to list
I call it i.e.
create_entry("CA_NAME",0,10,CA)
CA is defined CA = “”
My intention is to simplify creting multiple entry fieeds. that works fine so long. with the parameter “data_name” I like to pass a the name of a vaiable the entry value should be stored, but is alwasy empty. How can I update it when entering data in the filed or modify the value in the field
Thank you for any help or hint