Table of Contents

Property CanFocus

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

CanFocus

Gets or sets a value indicating whether this View can be focused.

public bool CanFocus { get; set; }

Property Value

bool

Remarks

See the View Navigation Deep Dive for more information: https://gui-cs.github.io/Terminal.GuiV2Docs/docs/navigation.html

SuperView must also have CanFocus set to true.

When set to false, if an attempt is made to make this view focused, the focus will be set to the next focusable view.

When set to false, the value of CanFocus for all subviews will be cached so that when CanFocus is set back to true, the subviews will be restored to their previous values.

Changing this property to true will cause TabStop to be set to TabStop" as a convenience. Changing this property to false will have no effect on TabStop.