|
Re: CellRendererCombo example?: msg#00154gnome.gtk+.python
Hi, This is a reply to my own mail, I got CellRendererCombo working. But is it possible to use entry completion for either CellRendererText or CellRendererCombo in TreeView? Thanks, Baiju M ------------------------------------------------------ import pygtk pygtk.require('2.0') import gtk import gobject w = gtk.Window() #list store for cell renderer m = gtk.ListStore(gobject.TYPE_STRING) for x in range(1, 5): m.append(["selection %d" % x]) #list store for treeview s = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_OBJECT) s.append(("hello", m)) s.append(("world", m)) cb = gtk.CellRendererCombo() cb.set_property("model",m) cb.set_property('text-column', 0) cb.set_property('editable', gtk.TRUE) c = gtk.TreeViewColumn("Test", cb) c.set_attributes(cb, text = 0) t = gtk.TreeView() t.append_column(c) t.set_model(s) w.add(t) w.show_all() gtk.main() ------------------------------------------------------ _______________________________________________ pygtk mailing list pygtk@xxxxxxxxxx http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Displaying Images (Examples needed): 00154, Nikos Kouremenos |
|---|---|
| Next by Date: | is this normal? (with shots): 00154, Nikos Kouremenos |
| Previous by Thread: | CellRendererCombo example?i: 00154, Baiju M |
| Next by Thread: | Re: gtk+ and pygtk to MacOSX: 00154, Christian Robottom Reis |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |