[pygtk] Programmatically invoking interactive searching in "Gtk.TreeView"
Ajay Garg
ajaygargnsit at gmail.com
Fri Dec 7 01:55:25 WST 2012
Hi all.
I have a piece of code on the lines ::
.........
self._treeview = Gtk.TreeView(self._store)
self._treeview.set_search_entry(self._entry)
self._treeview.set_search_equal_func(self._search, None)
self._treeview.set_search_column(0)
..........
where "self._search" is defined as ::
........
def _search(self, model, column, key, iterator,
data=None):
value = model.get_value(iterator, column)
if key.lower() in value.lower():
return False
return True
........
Now, when I INTERACTIVELY type a search-string in the text-entry
"self._entry", the search works fine, and the searched row is scrolled-to.
So, my query is, is it possible to programmatically call the above
procedure, when the "self._entry" is set with a text PROGRAMMATICALLY (on
the lines of "self._entry.set_text('ajay garg')"?
I guess there must be Gtk.Treeview callback attached to "self._entry",
which then internally calls "self._search".
Are my assumptions true? If yes, please let me know the Gtk.Treeview
callback attached to "self._entry", so that I may call it programmatically
:)
Regards,
Ajay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.daa.com.au/pipermail/pygtk/attachments/20121206/83ff370e/attachment.html>
More information about the pygtk
mailing list