your command for that button is going to cause issues, I've noticed whenever you have command=method_or_function(parameter) it immediately attempts to run that command, I've side stepped this by creating methods that know to grab that parameter.I'm not completely sure about the rest of the issue, I'd need to see more of the code. Here's an example of what I was talking about though:
self.searchlbl=Label(self,text='Search:')
self.searchlbl.grid(row=2,column=0)
self.search=ttk.Combobox(self)
self.search['values']=contact_list
self.search.bind('<Return>',self.eventsearch_for)
self.search.focus_set()
self.submit=ttk.Button(self,text='Search',command=self.search_for)
self.submit.bind('<Return>',self.eventsearch_for)
self.submit.grid(row=2,column=5)
def search_for(self):
self.search1=self.search.get()
self.search.delete(0,END)
query_key=self.search1.title()
if query_key in ab.keys():
pop_up(query_key)
else:
fail('dict',query_key)