[pygtk] gtk.TreeStore with variable column count ?

2005-06-01 Thread Adrian Immler
how can i create a gtk.TreeStore with a variable count of the columns ?

or

how can i add/remove columns from a TreeStore ?

i need to draw a table like in gnumeric where i don't know how many
columns i need so i will have to contruct it dynamically, any ideas ?

thanks in advance,

adrian
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] gtk.TreeStore with variable column count ?

2005-06-01 Thread David M. Cook
On Wed, Jun 01, 2005 at 08:54:52AM +, Adrian Immler wrote:

 how can i create a gtk.TreeStore with a variable count of the columns ?
 how can i add/remove columns from a TreeStore ?

I don't think it's possible to add/remove columns from an existing store.  

Instead I would suggest using objects (which could just be dictionaries) in
your TreeStore together with a TreeView data func.  This gives you lots of
flexibility.  Alternatively, you could get a TreeModelFilter from your
model. See the tutorial for more info.

Dave Cook



___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/