def triggeredcomplete(self):

        if self.cycle:  # need to delete selection otherwise we would fix the current position
            self.delete(self.position, tk.END)
            self._hit_index += 1
            if self._hit_index == len(self._hits):
                self._hit_index = 0

        else:  # set position to end so selection starts where textentry ended
            self.position = len(self.get())
            wstartsc = self.get().rfind(':')
            wstartsp = self.get().rfind(' ')
            if wstartsc < 0 and wstartsp < 0:
                self.wstart = 0
            elif wstartsc > wstartsp:
                self.wstart = wstartsc + 1
            else:
                self.wstart = wstartsp + 1

            # collect hits
            _hits = []
            for element in self._completion_list:
                if self.case_sensitive == 0:
                    if element.lower().startswith(self.get()[self.wstart:].lower()):
                        _hits.append(element)
                else:
                    if element.startswith(self.get()[self.wstart:]):
                        _hits.append(element)

            self._hit_index = 0
            self._hits = _hits

        # now finally perform the triggered completion
        if self._hits:
            self.delete(self.wstart, tk.END)
            self.insert(self.wstart, self._hits[self._hit_index])
            self.select_range(self.position, tk.END)
triggeredcomplete the Entry, delta may be 0/1 to cycle through possible hits
dataset/ETHPy150Open cpbotha/nvpy/nvpy/view.py/TriggeredcompleteEntry.triggeredcomplete