Gtk.EntryCompletion Class
This object allows a widget to suggest possible completions of a string which has been partially entered.

See Also: EntryCompletion Members

Syntax

public class EntryCompletion : GLib.Object, CellLayout

Remarks

The partially-entered string is also referred to as a "key".

C# Example

using System;
using Gtk;

public class DemoEntryCompletion : Window
{
        static void Main ()
        {
                Application.Init ();
                new DemoEntryCompletion ();
                Application.Run ();
        }

        public DemoEntryCompletion () : base ("Demo Entry Completion")
        {
                this.BorderWidth = 10;
                this.Resizable = false;
                VBox vbox = new VBox ();

                Label label = new Label ("Completion demo, try writing <b>total</b> or </b>gnome</b> for example.");
                label.UseMarkup = true;
                vbox.PackStart (label, false, true, 0);

                Entry entry = new Entry ();
                entry.Completion = new EntryCompletion ();
                entry.Completion.Model = CreateCompletionModel ();
                entry.Completion.TextColumn = 0;
                vbox.PackStart (entry, false, true, 0);

                this.Add (vbox);
                this.ShowAll ();
        }

        TreeModel CreateCompletionModel ()
        {
                ListStore store = new ListStore (typeof (string));

                store.AppendValues ("GNOME");
                store.AppendValues ("total");
                store.AppendValues ("totally");

                return store;
        }
}

  

Requirements

Namespace: Gtk
Assembly: gtk-sharp (in gtk-sharp.dll)
Assembly Versions: 2.12.0.0
Since: Gtk# 2.4