How can I remove the sort indicator in a GtkTreeViewColumn while preserving the collation of the columns?

I know this is a bug and is considered not a problem, but when you have many columns that you still want to sort, they all show up without having to scroll right and left, and the sort arrow indicator is not that important. What are the workarounds?

+3


source to share


1 answer


I found it can be done with not applying set_sort_column_id

to a tree column . We have to do this programmatically, using a method set_clickable

for the column where you don't want the arrow to appear in its header, then using signal_connect

for a signal clicked

and binding it to a functionwhich will use the get_sort_column_id

modelsto get the current sort order: GTK_SORT_ASCENDING

or GTK_SORT_DESCENDING

then apply the sort order backwards using set_sort_column_id

in the model .



+1


source







All Articles