[pygtk] Re: Re: Reorderable columns
Alan Franzoni
alan.franzoni.xyz at gmail.com
Mon Jan 30 07:43:45 WST 2006
Il Sun, 29 Jan 2006 22:18:01 +0100, Stefano Esposito ha scritto:
> col.set_sort_column_id(num)
I think your problem has to do with the fact you have four columns in your
model, but just three in your view.
The TreeViewColumn method you're using sets the id to the column number of
the *model*, not of the view. A quick fix in this test case would be:
col.set_sort_column_id(num+1)
But, generally speaking, should you want to do such things, you should try
to create a sort of 'mapping' between the model and the view in order to
set the proper id sorting index. Also, make a distinction between the model
and the view!
--
Alan Franzoni <alan.franzoni.xyz a gmail.com>
-
Togli .xyz dalla mia email per contattarmi.
To contact me, remove .xyz from my email address.
-
GPG Key Fingerprint:
5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E
More information about the pygtk
mailing list