How do I display a combo box in a Treeview?
In PyGTK 2.6+, there is now a Combo Renderer: [www.pygtk.org] Baiju M provided an example: [www.daa.com.au] But be careful that there’s a bug with the ‘edited’ signal and the CellRendererCombo. • PyGTK example of the bug: [www.daa.com.au] • Bug reported in GTK: [bugzilla.gnome.org] *-*-* If you want to do it the old way: Lorenzo Gil Sanchez writes: Currently, you can only do that with C. With Python you can create a custom CellRenderer to render the cells in the way you want. What you can not do in Python is a CellRender with edit capabilities, like a combo box. If you want a CellRenderer to support edition it must implement the CellEditable interface. There is no way to make a Python class to implement a GLib interface with the current PyGTK bindings. Having said that, Lorenzo did provide a hacked version of a Treeview with Combos; check it out at [www.mail-archive.
In PyGTK 2.6+, there is now a Combo Renderer: [www.pygtk.org] Baiju M provided an example: [www.daa.com.au] But be careful that there’s a bug with the ‘edited’ signal and the CellRendererCombo. • PyGTK example of the bug: [www.daa.com.au] • Bug reported in GTK: [bugzilla.gnome.org] *-*-* If you want to do it the old way: Lorenzo Gil Sanchez writes: Currently, you can only do that with C. With Python you can create a custom CellRenderer to render the cells in the way you want. What you can not do in Python is a CellRender with edit capabilities, like a combo box. If you want a CellRenderer to support edition it must implement the CellEditable interface. There is no way to make a Python class to implement a GLib interface with the current PyGTK bindings.