re[pygtk] trieve data store in a gtk.ListStore

Stephen George steve_geo at optusnet.com.au
Mon Dec 3 14:47:23 WST 2007


I am able to access the data of the model as such

        items = self.combo.get_model()
        for item in items:
            print 'Found Item: ', item[0]

Steve

awalter1 wrote:
> Hi,
>
> I have some difficulties to manipulate ListStore. I define a liststore and
> associated it to a combobox:	
>
> liststore = gtk.ListStore(str)
> fieldCombo = gtk.ComboBox(liststore)
> liststore.append(['Field'])
> for field in l_fields:
>    liststore.append([field])
> fieldCombo.connect('changed', self.ComboActivate, liststore)
>
> def ComboActivate(self, combo, liststore):
>    ...
>
> >From ComboActivate how to retrieve the list of data liststore contains ?
> Is it possible to get these data directly from combo (that avoid the
> liststore parameter) ?
>
> Thank you
>
>
>
>
>   



More information about the pygtk mailing list