manpagez: man pages & more
html files: gtk
Home | html | info | man


GtkSearchEntry — An entry which shows a search icon



void search-changed Run Last

Types and Values

Object Hierarchy

    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkEntry
                ╰── GtkSearchEntry

Implemented Interfaces

GtkSearchEntry implements AtkImplementorIface, GtkBuildable, GtkEditable and GtkCellEditable.


#include <gtk/gtk.h>


GtkSearchEntry is a subclass of GtkEntry that has been tailored for use as a search entry.

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.

Note that the search/clear icon is shown using a secondary icon, and thus does not work if you are using the secondary icon position for some other purpose.

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 “search-changed” signal which can be used instead of the “changed” signal.


gtk_search_entry_new ()

GtkWidget *
gtk_search_entry_new (void);

Creates a GtkSearchEntry, with a find icon when the search field is empty, and a clear icon when it isn't.


a new GtkSearchEntry

Since 3.6

Types and Values

struct GtkSearchEntry

struct GtkSearchEntry;

Signal Details

The “search-changed” signal

user_function (GtkSearchEntry *entry,
               gpointer        user_data)

The “search-changed” signal is emitted with a short delay of 150 milliseconds after the last change to the entry text.



the entry on which the signal was emitted



user data set when the signal handler was connected.


Flags: Run Last

Since 3.10

© 2000-2024
Individual documents may contain additional copyright information.