'Show the autocomplete list, bind events.
If complete is True, complete the text, and if there is exactly one
matching completion, don\'t open a list.'

def show_window(self, comp_lists, index, complete, mode, userWantsWin):

    (self.completions, self.morecompletions) = comp_lists
    self.mode = mode
    self.startindex = self.widget.index(index)
    self.start = self.widget.get(self.startindex, 'insert')
    if complete:
        completed = self._complete_string(self.start)
        start = self.start
        self._change_start(completed)
        i = self._binary_search(completed)
        if ((self.completions[i] == completed) and ((i == (len(self.completions) - 1)) or (self.completions[(i + 1)][:len(completed)] != completed))):
            return (completed == start)
    self.userwantswindow = userWantsWin
    self.lasttypedstart = self.start
    self.autocompletewindow = acw = Toplevel(self.widget)
    acw.wm_geometry('+10000+10000')
    acw.wm_overrideredirect(1)
    try:
        acw.tk.call('::tk::unsupported::MacWindowStyle', 'style', acw._w, 'help', 'noActivates')
    except TclError:
        pass
    self.scrollbar = scrollbar = Scrollbar(acw, orient=VERTICAL)
    self.listbox = listbox = Listbox(acw, yscrollcommand=scrollbar.set, exportselection=False, bg='white')
    for item in self.completions:
        listbox.insert(END, item)
    self.origselforeground = listbox.cget('selectforeground')
    self.origselbackground = listbox.cget('selectbackground')
    scrollbar.config(command=listbox.yview)
    scrollbar.pack(side=RIGHT, fill=Y)
    listbox.pack(side=LEFT, fill=BOTH, expand=True)
    acw.lift()
    self.listbox.select_set(self._binary_search(self.start))
    self._selection_changed()
    self.hideaid = acw.bind(HIDE_VIRTUAL_EVENT_NAME, self.hide_event)
    self.hidewid = self.widget.bind(HIDE_VIRTUAL_EVENT_NAME, self.hide_event)
    acw.event_add(HIDE_VIRTUAL_EVENT_NAME, HIDE_FOCUS_OUT_SEQUENCE)
    for seq in HIDE_SEQUENCES:
        self.widget.event_add(HIDE_VIRTUAL_EVENT_NAME, seq)
    self.keypressid = self.widget.bind(KEYPRESS_VIRTUAL_EVENT_NAME, self.keypress_event)
    for seq in KEYPRESS_SEQUENCES:
        self.widget.event_add(KEYPRESS_VIRTUAL_EVENT_NAME, seq)
    self.keyreleaseid = self.widget.bind(KEYRELEASE_VIRTUAL_EVENT_NAME, self.keyrelease_event)
    self.widget.event_add(KEYRELEASE_VIRTUAL_EVENT_NAME, KEYRELEASE_SEQUENCE)
    self.listupdateid = listbox.bind(LISTUPDATE_SEQUENCE, self.listselect_event)
    self.winconfigid = acw.bind(WINCONFIG_SEQUENCE, self.winconfig_event)
    self.doubleclickid = listbox.bind(DOUBLECLICK_SEQUENCE, self.doubleclick_event)
    return None
