Gtk.Widget.CanFocus Property
Determines whether the widget is able to receive the focus.

Syntax

[GLib.Property("can-focus")]
public bool CanFocus { set; get; }

Value

Evaluates to true if the widget is able to handle focus grabs.

Remarks

If the widget property Widget.Sensitive evaluates to false, the Widget.CanFocus property will also return false. widget must be a focusable widget, such as an Gtk.Entry; something like Gtk.Frame won't work. More precisely, it must have the property Widget.CanFocus set.

The Widget.CanFocus property is just the helper that will tell you whether the widget is focusable.

Evaluate it before you make a call to Widget.GrabFocus(), if you are unsure about the "focusability" of the widget.

[FIXME] This two links are seealso instead see: Widget.HasFocus and Widget.GrabFocus()

Requirements

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