Description [src]

final class Gtk.SearchEntry : Gtk.Widget {
  /* No available fields */

GtkSearchEntry is an entry widget that has been tailored for use as a search entry.

The main API for interacting with a GtkSearchEntry as entry is the GtkEditable interface.

An example GtkSearchEntry

It will show an inactive symbolic “find” icon when the search entry is empty, and a symbolic “clear” icon when there is text. Clicking on the “clear” icon will empty the search entry.

To make filtering appear more reactive, it is a good idea to not react to every change in the entry text immediately, but only after a short delay. To support this, GtkSearchEntry emits the GtkSearchEntry::search-changed signal which can be used instead of the GtkEditable::changed signal.

The GtkSearchEntry::previous-match, GtkSearchEntry::next-match and GtkSearchEntry::stop-search signals can be used to implement moving between search results and ending the search.

Often, GtkSearchEntry will be fed events by means of being placed inside a GtkSearchBar. If that is not the case, you can use gtk_search_entry_set_key_capture_widget() to let it capture key input from another widget.

CSS Nodes
╰── text

GtkSearchEntry has a single CSS node with name entry that carries a .sarch style class, and the text node is a child of that.


GtkSearchEntry uses the GTK_ACCESSIBLE_ROLE_SEARCH_BOX role.




Creates a GtkSearchEntry.



Emitted when the entry is activated.


Emitted when the user initiates a move to the next match for the current search string.


Emitted when the user initiates a move to the previous match for the current search string.


Emitted with a short delay of 150 milliseconds after the last change to the entry text.


Emitted when the user initiated a search on the entry.


Emitted when the user stops a search via keyboard input.