libs/tkinter_extension.py
def autofill(self, delta=0):
		"""autocomplete the Combobox, delta may be 0/1/-1 to cycle through possible hits"""
		if delta: # need to delete selection otherwise we would fix the current position
			self.delete(self.position, END)
		else: # set position to end so selection starts where textentry ended
			self.position = len(self.get())
		# collect hits
		_hits = []
		for element in self._completion_list:
			if self.get().lower() in element: # Match case insensitively
				_hits.append(element)
		# if we have a new hit list, keep this in mind
		if _hits != self._hits:
			self._hit_index = 0
			self._hits=_hits
		# only allow cycling if we are in a known hit list
		if _hits == self._hits and self._hits:
			self._hit_index = (self._hit_index + delta) % len(self._hits)
		# now finally perform the auto completion
		'''
		if self._hits:
			self.delete(0,END)
			self.insert(0,self._hits[self._hit_index])
			self.select_range(self.position,END)
		'''
autocomplete the Combobox, delta may be 0/1/-1 to cycle through possible hits
autocomplete the Combobox, delta may be 0/1/-1 to cycle through possible hits
autocomplete the Combobox delta may be 0 / 1 / - 1 to cycle through possible hits
def autofill(self, delta=0):
		if delta: 
			self.delete(self.position, END)
		else: 
			self.position = len(self.get())
		_hits = []
		for element in self._completion_list:
			if self.get().lower() in element: 
				_hits.append(element)
		if _hits != self._hits:
			self._hit_index = 0
			self._hits=_hits
		if _hits == self._hits and self._hits:
			self._hit_index = (self._hit_index + delta) % len(self._hits)
def autofill ( self , delta = 0 ) : if delta : self . delete ( self . position , END ) else : self . position = len ( self . get ( ) ) _hits = [ ] for element in self . _completion_list : if self . get ( ) . lower ( ) in element : _hits . append ( element ) if _hits != self . _hits : self . _hit_index = 0 self . _hits = _hits if _hits == self . _hits and self . _hits : self . _hit_index = ( self . _hit_index + delta ) % len ( self . _hits ) '''
		if self._hits:
			self.delete(0,END)
			self.insert(0,self._hits[self._hit_index])
			self.select_range(self.position,END)
		'''
autocomplete the Combobox, delta may be 0/1/-1 to cycle through possible hits
autocomplete the Combobox delta may be 0 / 1 / - 1 to cycle through possible hits
"""autocomplete the Combobox, delta may be 0/1/-1 to cycle through possible hits""" # need to delete selection otherwise we would fix the current position # set position to end so selection starts where textentry ended # collect hits # Match case insensitively # if we have a new hit list, keep this in mind # only allow cycling if we are in a known hit list # now finally perform the auto completion '''
		if self._hits:
			self.delete(0,END)
			self.insert(0,self._hits[self._hit_index])
			self.select_range(self.position,END)
		'''
self
delta