IFocusableControl - ahatornn/clforms GitHub Wiki

IFocusableControl

ClForms.Abstractions.IFocusableControl
Specifies an interaction contract for all elements that take input focus

public interface IFocusableControl

Properties

Name Type Description
FocusBackground Color Focused component background color
FocusForeground Color Focused component text color
Id long Component id
IsFocus bool Gets or sets focus value of component
TabIndex int Gets or sets the sequence for moving the TAB key between the controls inside the container
TabStop bool Gets or sets a value indicating whether the user can focus on the given control using the TAB key

Methods

Syntax Description
CanFocus() Indicates whether component focus can be set
InputAction(ConsoleKeyInfo) Handles a keystroke
SetFocus() Sets input focus to current item

Events

Event Description
OnEnter Input focus event
OnLeave Input focus loss event
OnTabIndexChanged Occurs when a property value of TabIndex changes
OnTabStopChanged Occurs when a property value of TabStop changes