SearchBar


Object Hierarchy:

Gtk.SearchBar Gtk.SearchBar Gtk.SearchBar Gtk.Bin Gtk.Bin Gtk.Bin->Gtk.SearchBar Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.Container GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Atk.Implementor Atk.Implementor Atk.Implementor->Gtk.SearchBar Atk.Implementor->Gtk.Bin Atk.Implementor->Gtk.Container Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.SearchBar Gtk.Buildable->Gtk.Bin Gtk.Buildable->Gtk.Container Gtk.Buildable->Gtk.Widget

Description:

[ CCode ( type_id = "gtk_search_bar_get_type ()" ) ]
[ Version ( since = "3.10" ) ]
public class SearchBar : Bin, Implementor, Buildable

SearchBar is a container made to have a search entry (possibly with additional connex widgets, such as drop-down menus, or buttons) built-in.

The search bar would appear when a search is started through typing on the keyboard, or the application’s search mode is toggled on.

For keyboard presses to start a search, events will need to be forwarded from the top-level window that contains the search bar. See handle_event for example code. Common shortcuts such as Ctrl+F should be handled as an application action, or through the menu items.

You will also need to tell the search bar about which entry you are using as your search entry using connect_entry. The following example shows you how to create a more complex search entry.

CSS nodes

GtkSearchBar has a single CSS node with name searchbar.

Creating a search bar

A simple example

GtkSearchBar


Namespace: Gtk
Package: gtk+-3.0

Content:

Properties:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class Gtk.Bin
All known members inherited from class Gtk.Widget
All known members inherited from interface Atk.Implementor