# encoding: iso-8859-1
import gtk

from kiwi.ui.widgets.entry import Entry

def on_entry_activate(entry):
    print 'You selected:', entry.get_text().encode('latin1')
    gtk.main_quit()

entry = Entry()
entry.connect('activate', on_entry_activate)
entry.set_completion_strings(['Belo Horizonte',
                              u'So Carlos',
                              u'So Paulo',
                              u'Bstad',
                              u'rnskldsvik',
                              'sanca',
                              'sampa'])

win = gtk.Window()
win.connect('delete-event', gtk.main_quit)
win.add(entry)
win.show_all()

gtk.main()

@@ -136,56 +136,146 @@
 try.
-get_text().encode('latin1')%0A    gtk.main_quit()%0A
+read()%0A    gtk.main_quit()%0A%0Awin = gtk.Window()%0Awin.connect('delete-event', gtk.main_quit)%0A%0Avbox = gtk.VBox()%0Awin.add(vbox)%0A%0A# Normal entry
 %0Aent
@@ -383,38 +383,8 @@
 te',
-%0A                             
  u'S
@@ -440,37 +440,8 @@
 lo',
-%0A                            
   u'
@@ -496,46 +496,172 @@
 ik',
-%0A                              'sanc
+ 'sanca', 'sampa'%5D)%0Avbox.pack_start(entry)%0A%0A%0Aentry = Entry()%0Aentry.connect('activate', on_entry_activate)%0Aentry.set_completion_strings(%5B'Brazil', 'Sweden', 'Chin
 a'
+%5D
 ,%0A  
@@ -691,97 +691,78 @@
     
- 'sampa'%5D)%0A%0Awin = gtk.Window()%0Awin.connect('delete-event', gtk.main_quit)%0Awin.add
+%5B186, 9, 1306%5D)%0Aentry.set_completion_strings()%0Avbox.pack_start
 (entry)%0A
 win.
@@ -757,16 +757,17 @@
 (entry)%0A
+%0A
 win.show
@@ -774,16 +774,18 @@
 _all()%0A%0A
+%0A%0A
 gtk.main

Add an entry completion example