Gtk.Widget.GrabFocus Method
Causes a widget to have the keyboard focus for the Gtk.Window it's inside.

Syntax

public void GrabFocus ()

Remarks

The widget must be a focusable widget, such as a Gtk.Entry; something like Gtk.Frame won't work (More precisely, it must have the Widget.CanFocus flag set).

Requirements

Namespace: Gtk
Assembly: gtk-sharp (in gtk-sharp.dll)