[pygtk] Liststore model

Alberto Ruiz aruiz at gnome.org
Fri Jan 12 21:50:29 WST 2007


2007/1/12, Volker Helm <Helm.volker at gmx.de>:
>
> Hi,
>
> I'm trying to implement programm based on a database. Since there are a
> lot of columns in a database I'd like to generate a gtk.ListStore model
> dynamicly.
>
> normally, I'd do something like this:
>
> import pygtk
> ...
> win =3D gtk.Window()
> listmodel =3D gtk.ListStore(str,str,str,int,str)
> tv =3D gtk.TreeView(listmodel)
> ...
>
> I'd prefer:
>
> import gtk
> ...
> win =3D gtk.Window()
> listmodel =3D gtk.Liststore(str)
> # now append some column to the model
>
> # go on
> tv =3D gtk.Treeview(listmodel)
>
> Does anybody has an idea, how to solve this problem without using
> completly the generic model?
>
> Thanks in advance,


Sorry, but I don't get what the question is.

Volker
>

-- =

Un saludo,
Alberto Ruiz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20070112/6111c383/at=
tachment.htm


More information about the pygtk mailing list