diff --git a/custom_popup.py b/custom_popup.py index e9cbab4..88cea99 100644 --- a/custom_popup.py +++ b/custom_popup.py @@ -235,7 +235,10 @@ class Input_popup(Toplevel): label_font = font.Font(weight='bold', size=9) Label(lbf_new, text="", font=label_font).grid(row=0, column=0, sticky="W") - Entry(lbf_new, textvariable=self.inp_value, width=100).grid(row=0, column=1, sticky="W", pady=10) + input_entry = Entry(lbf_new, textvariable=self.inp_value, width=100) + input_entry.grid(row=0, column=1, sticky="W", pady=10) + input_entry.focus() + self.after(0,input_entry.focus) self.btn = Button(self, text="Valider", command=self.destroy)