I have created a TreeView with several columns and the corresponding ListStore that holds the data.
What I would like to do now is to automatically create a dropdown under each column that will hold the distinct values of that column and perform filtering. So basically I want to create an excel like auto filter functionality.
Can this be achieved via the TreeView control? Are there any other controls out in the wild that can provide something like that?
答案 0 :(得分:0)
我在Python中使用过TreeView / TreeStore,但我还没有尝试过你想要的东西。不过,C文档中有一些很有前途的东西:
gtk_tree_view_column_set_widget
将您的菜单按钮放在列标题gtk_tree_view_column_set_clickable
使其可点击因此我觉得你拿走Gtk.TreeViewColumn
对象,打电话给col.set_widget(my_menu_widget)
,可能打电话给col.set_clickable(True)
,鲍勃是你的叔叔。