I'm looking for a way to add autocomplete functionality to my
Windows based Tkinter applications running under Python 2.7
(32-bit).

I've started by using code found on the wiki, but I'm open to
other suggestions as well. Ideally I'd like a solution that works
with the ttk.Entry widget.

Here's the link to the wiki's auto-complete widget that I'm
trying to get to work.
[1]http://tkinter.unpythonic.net/wiki/AutocompleteEntry

When I run the code on this page, I receive the following
traceback:

C:\test>py27 tkautocomplete.py
Type a 't' to test the AutocompleteEntry widget.
Will use AutocompleteEntry.set_completion_list((u'test', u'type',
u'true', u'tre
e', u'time'))
Try also the backspace key and the arrow keys.
Traceback (most recent call last):
  File "tkautocomplete.py", line 99, in <module>
    test(test_list)
  File "tkautocomplete.py", line 89, in test
    entry.set_completion_list(test_list)
  File "tkautocomplete.py", line 35, in set_completion_list
    self.bind('<KeyRelease>', self.handle_keyrelease)
AttributeError: AutocompleteEntry instance has no attribute
'handle_keyrelease'

The traceback complains about a missing handle_keyrelease
attribute which is present in the sample code.

I'm using the 32-bit version of Python 2.7 for Windows under
Windows 7 Professional.

Thank you,
Malcolm

References

1. http://tkinter.unpythonic.net/wiki/AutocompleteEntry
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to