ComboBox with two columns
<p>I'm trying to create a <code>GtkComboBox</code> with two columns. I picked up some examples and I'm trying to adapt but without success. Only the items that would be the second column are shown.</p>

<pre><code>#!/usr/bin/env python3

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk

class ComboBox(Gtk.Window):
    def __init__(self):
        Gtk.Window.__init__(self)
        self.set_title("ComboBox")
        self.set_default_size(150, -1)
        self.connect("destroy", Gtk.main_quit)

        slist = Gtk.ListStore(str, str)
        slist.append(['01', 'Ferro'])
        slist.append(['07', 'Uranio'])
        slist.append(['08', 'Cobalto'])

        combobox = Gtk.ComboBox()
        combobox.set_model(slist)
        combobox.set_active(0)
        combobox.set_wrap_width(2)
        self.add(combobox)

        cellrenderertext = Gtk.CellRendererText()
        combobox.pack_start(cellrenderertext, True)
        combobox.add_attribute(cellrenderertext, "text", 1)

window = ComboBox()
window.show_all()

Gtk.main()
</code></pre>

<p>I want create a <code>GtkComboBox</code> like this:</p>

<p><a href="http://i.stack.imgur.com/bJo1s.gif" rel="nofollow"><img src="http://i.stack.imgur.com/bJo1s.gif" alt="enter image description here"></a></p>

<p>There must be a CellRendererText for each column to be displayed.</p>

<pre><code>cell1 = Gtk.CellRendererText()
cell2 = Gtk.CellRendererText()
combobox.pack_start(cell1, True)
combobox.pack_start(cell2, True)
combobox.add_attribute(cell1, "text", 0)
combobox.add_attribute(cell2, "text", 1)
</code></pre>

python python-3.x gtk gtk3