|
Multiple columns in a ComboBoxEntry: msg#00128gnome.gtk+.python
I am pretty new to PyGTK and am having some trouble trying to get a comboboxentry with multiple columns in it. I am using glade 2.6.7, pygtk 2.4.1 on Gentoo linux I am trying to rewrite an Access database GUI in pygtk. In Access I have a combobox that has multiple columns, including one with the primary key that is hidden. I select the entry using the combobox and jump to the entry with that primary key. I would like to do something similar with pygtk. As the ComboBoxEntry widget is reasonably new I am finding it difficult to find more complex examples of how to use it. I am already using John Finlay's tutorial and reference. I am trying to use a ComboBoxEntry with a multiple column liststore. It is partially working. I can load all the columns into the list store but I can only display one at a time. Is there anyway to display multiple columns? Or should I be using a TreeStore? The ComboBoxEntry is created by glade. Then I use the following code: combo_widget = widgets.get_widget('comboboxentry') liststore = gtk.ListStore(str, str, str, str) for r in rows: liststore.append(r) combo.set_model(liststore) combo.set_text_column(1) thanks for your suggestions Greg _______________________________________________ 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: stock item: 00128, Marcus Habermehl |
|---|---|
| Next by Date: | Re: Multiple columns in a ComboBoxEntry: 00128, John Finlay |
| Previous by Thread: | Remove multiple rows from a sorted TreeViewi: 00128, Mattias Karlsson |
| Next by Thread: | Re: Multiple columns in a ComboBoxEntry: 00128, John Finlay |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |