Re: GtkField becoming the interactive search field
| From: | Scott Mattocks | Date: | Mon, 06 Mar 2006 17:44:39 +0000 |
| Subject: | Re: GtkField becoming the interactive search field | ||
| References: | 1 2 3 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-6777@lists.php.net to get a copy of this message | ||
CsMAr51 wrote:
When you hit a key on a GtkTreeView (or hit ctrl+f) it opens a field for interactive search on the GtkTreeView. I've already used GtkTreeView::set_search_column() to do that, but I want to use a GtkField that I've created instead of the default one. Here is the example of what I want: http://csmar51.dyndns.org/php-gtk/replace.pngI am still not sure where GtkField comes from. I think you mean GtkEntry. Anyway, I think I know what you are asking. I don't think there is a method to swap out the search widget with one of your own. Christian's dev_inspector may help you find a way to pull it out of the treeview's (grand-)children. This is how I would do it: First, turn off interactive search. Then check for changes in your GtkEntry by connecting to one of the GtkEntry signals (probably insert-at-cursor) and then search the model (GtkTreeModel::foreach()) from your GtkTreeView. When you find a value you can scroll to the cell your are looking for (GtkTreeView::scroll_to_cell()). -- Scott Mattocks http://www.crisscott.com