How would I access the string that is in the [1] position of a tuple at a given index of a listbox. What I'm trying to do is something like this:


Lb1 is obviously the listbox. This particular attempt claims 1 is out of range "although I know it has a string in that position". With [0] in the position when it gets to Lb1[a] it claims, can't convert type int to str implicitly, however I wouldn't want to do that, because, futilely, I'm trying to index it.

5 Years
Discussion Span
Last Post by pyTony
Featured Replies
  • 1

    May the DaniWeb (and Vegaseat) be with you! [url]http://www.daniweb.com/software-development/python/threads/191210/948470#post948470[/url] Read More


That was extremely helpful. However I'm still having a hard time figuring out how to use the -autocomplete option and if I can make commands directly to the entry widget of the combobox separately.


hmm, would I need to do multi-threading to have a loop continuously looking through what's in the entry field of the combobox? I really like the listbox that drops when you take a moment to think of what you're trying to type in tkinter, specifically I like how it goes directly to the closest match to what you've typed in. That's not the autocomplete is it?

Edited by pyguy62: n/a


No, event loop takes care of that, above code hooked to key release event.Then if you need repeated activity you can use after method of a widget. See the second link (maybe 2to3 script can prepare it for Python3, by the way you can install both Python2 and Python3 without too much confusion).

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.