Object Hierarchy:

Object hierarchy for SearchEntry


[ CCode ( type_id = "gtk_search_entry_get_type ()" ) ]
public class SearchEntry : Widget, Accessible, Buildable, ConstraintTarget, Editable

SearchEntry 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 Editable interface.

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, SearchEntry emits the search_changed signal which can be used instead of the changed signal.

The previous_match, next_match and 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 SearchBar. If that is not the case, you can use set_key_capture_widget to let it capture key input from another widget.

CSS Nodes
╰── text
earchEntry 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 SEARCH_BOX role.

Namespace: Gtk
Package: gtk4



Creation methods:



Inherited Members:

All known members inherited from class Gtk.Widget