[pygtk] floating point precision
Tim Evans
t.evans at aranz.com
Wed Mar 9 04:45:28 WST 2011
On 2011-03-08 18:49, Saeed Rasooli wrote:
> But the cleaner way is using:
>
> gtk.TreeViewColumn.set_cell_data_func
>
> http://www.moeraki.com/pygtktutorial/pygtk2reference/class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-cell-data-func
>
I normally avoid cell data funcs because of how slow they are for large
treeviews. If you only have a small amount of data they work fine, but
for a large amount the constant calls back into python for every single
detail makes it so slow as to be useless.
On 2011-03-08 17:26, Johann Schatzer wrote:
> how could the string column then be sortable by number?
Use gtk.TreeViewColumn.set_sort_column_id to point the sorting at the
float column in the model. This is where the separation between view
columns and model columns comes in handy.
--
Tim Evans
More information about the pygtk
mailing list