Class: Gtk::SearchEntry

  • Object
show all
Defined in:

Instance Method Summary collapse

Instance Method Details

#handle_event(event) ⇒ TrueClass

This function should be called when the top-level window which contains the search entry received a key event. If the entry is part of a Gtk::SearchBar, it is preferable to call gtk_search_bar_handle_event() instead, which will reveal the entry in addition to passing the event to this function.

If the key event is handled by the search entry and starts or continues a search, %GDK_EVENT_STOP will be returned. The caller should ensure that the entry is shown in this case, and not propagate the event further.


  • event (Gdk::Event)

    a key event


  • (TrueClass)

    %GDK_EVENT_STOP if the key press event resulted in a search beginning or continuing, %GDK_EVENT_PROPAGATE otherwise.


Creates a Gtk::SearchEntry, with a find icon when the search field is empty, and a clear icon when it isn’t.