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

Marco Antonio Islas Cruz markuz at islascruz.org
Fri Nov 30 23:46:14 WST 2007


The combo is just a Viewer, it never stores data, just shows it. In
order to retrieve data you need to use the model (liststore, treestore,
or another TreeModel kind of object)


On Fri, 2007-11-30 at 06:24 -0800, 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
> 
> 
> 
> 
-- 
<--Linux... Because I'm Free-->
Marco Antonio Islas Cruz
"Markuz"
Linux User #280229
markuz at islascruz.org
markuz at unixmexico.org
markuz at linuxpozarica.com
marco.islas at gmail.com
islacruz at yahoo.com
http://www.islascruz.org
http://sourceforge.net/projects/gpkg/
http://www.linuxpozarica.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20071130/09cdead0/attachment.pgp


More information about the pygtk mailing list