2010-08-26 20 views
5

我該如何真正禁用gtk treeview交互式搜索? docsset_enable_search(False),但如果我這樣做,CTRL + F仍然會導致一個惱人的搜索彈出窗口出現。連接到start-interactive-search並返回True也不起作用。_really_ disable GtkTreeView搜索

回答

5

的pygtk的文檔沒有說明這一點,但C docs做:

gtk_tree_view_set_search_column (GtkTreeView *tree_view, gint column) 

column : 
    the column of the model to search in, or -1 to disable searching 

傳遞-1該列真正禁用搜索。

+1

鏈接爛了。我認爲你的意思是gtk_tree_view_set_search_column(-1),因爲這似乎工作。 – ergosys 2011-11-28 04:39:57