2008/6/23 BJörn Lindqvist <[EMAIL PROTECTED]>:
> I think the combo box you get from the widget tree already has a cell
> renderer text that renders the first column in the list store. If so,
> you could just change the column that the renderer will render:
>
> combo.set_attribute(combo.get_cells()[
On Sun, Jun 22, 2008 at 4:09 PM, Isaac Alston <[EMAIL PROTECTED]> wrote:
> I am making a search function where users can select two fields which
> they'd like to search on in a database. I'm having trouble displaying
> a single column from a gtk.ListStore with multiple columns in a
> gtk.ComboBox c
Hi,
Having recently had my own struggle with ComboBoxen (more specifically
ComboBoxEntry's), I can sum up my experience with the following
statement: (Py)Gtk wants ComboBoxes' models to have a str column first!
I've tried using a ListStore(gobject.TYPE_PYOBJECT) (for my own models)
with cust
2008/6/22 Bertrand Son Kintanar <[EMAIL PROTECTED]>:
> [...snip - code sample]
> notice the if statement highlighted. this will show the column if we set the
> flag to visible otherwise it will not show the column
Yes, I think this might work, although I am dubious about:
self.inputTreeView.append_
2008/6/22 Alessandro Dentella <[EMAIL PROTECTED]>:
>listore = gtk.ListStore(int, str)
>renderer = gtk.CellRendererText()
>completion.pack_start(renderer)
>completion.add_attribute(renderer, 'text', 1)
>completion.set_model(listore)
I've already tried this and I end up with ever
> future. So my question remains: how can I display a single column from
> a multi-column ListStore in a ComboBox?
I've never tryed in a ComboBox. I just guess is not very different than an
Entry. I paste here some code I have worked out in the past. the code is
working but I had to cut many parts
2008/6/22 Bertrand Son Kintanar <[EMAIL PROTECTED]>:
> i think this is because of your combo.set_model(self.search_lstore)which
> contains two elements. an int and a string. that makes it show the id and
> the name.
Yes, I thought that might be the case, but perhaps you misunderstood
me: I wish to
2008/6/22 Bertrand Son Kintanar <[EMAIL PROTECTED]>:
> can you throw in the whole code? not just snippets?
Yes, here it is: http://dpaste.com/hold/58199/ and here's the glade file:
http://dpaste.com/hold/58200/
I didn't post them the first time, because I wasn't sure if the rest
of the file was r
Hi,
I am making a search function where users can select two fields which
they'd like to search on in a database. I'm having trouble displaying
a single column from a gtk.ListStore with multiple columns in a
gtk.ComboBox correctly. I have two columns in my ListStore: 'id' and
'field'. 'field' hold