Hi
Martin (OpenGeoMap) wrote:
What about a gtk entry with autocompletion?
Hi Martin!
You response to the OP has me curious to know if 'autocompletion' is a
member function of the Entry class or if it is of a parent class. I am
using Gtkmm 2.10.x under Windows and I have not been able to find such
'Method' in the documentation that came with my installation of Gtkmm.
Here in python a complete sample using autocompletion:
entry = gtk.Entry()
completion = gtk.EntryCompletion()
entry.set_completion(completion)
liststore = gtk.ListStore(gobject.TYPE_STRING, gtk.gdk.Pixbuf)
completion.set_model(liststore)
pixbufcell = gtk.CellRendererPixbuf()
completion.pack_start(pixbufcell)
completion.add_attribute(pixbufcell, 'pixbuf', 1)
# create a gtk.CellRendererText and pack it in the completion. Also set the
# 'text' attribute
completion.set_text_column(0)
# load up the liststore with string - pixbuf data - assuming pixbuf created
the same for ruby/gnome, monogtk#, gtkmm, gtk, etc,..
liststore.append(['string text', pixbuf])
You need a entry and also the EntryCompletion class. The widget you can
see is the gtk::entry
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1EntryCompletion.html
Regards.
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list