Table of Contents

Interface IInteractiveControl

Namespace
SharpConsoleUI.Controls
Assembly
SharpConsoleUI.dll

Represents a control that can receive keyboard input and be focused.

public interface IInteractiveControl
Extension Methods

Properties

IsEnabled

Gets or sets whether this control is enabled and can receive input.

bool IsEnabled { get; set; }

Property Value

bool

WantsTabKey

When true, Tab and Shift+Tab are passed to ProcessKey(ConsoleKeyInfo) instead of being intercepted for focus traversal. If ProcessKey(ConsoleKeyInfo) returns false, the key bubbles back to focus traversal as normal. Default: false.

bool WantsTabKey { get; }

Property Value

bool

Methods

ProcessKey(ConsoleKeyInfo)

Processes a keyboard input event.

bool ProcessKey(ConsoleKeyInfo key)

Parameters

key ConsoleKeyInfo

The key information for the pressed key.

Returns

bool

True if the key was handled by this control; otherwise, false.