Class FocusableExtensions
Namespace: Aspid.FastTools.UIElements
Assembly: Aspid.FastTools.dll
Provides extension methods for Focusable.
public static class FocusableExtensions
Inheritance
Methods
BlurSelf<T>(T)
Removes focus from the element via Blur.
public static T BlurSelf<T>(this T element) where T : Focusable
Parameters
element T
The element to modify.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
FocusSelf<T>(T)
Gives focus to the element via Focus.
public static T FocusSelf<T>(this T element) where T : Focusable
Parameters
element T
The element to modify.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
IsFocused(Focusable)
Returns whether the element is the focusedElement of its panel.
public static bool IsFocused(this Focusable element)
Parameters
element Focusable
The element to check.
Returns
true if the element is the panel's focused element; otherwise, false.
Remarks
focusedElement reports the outermost composite element, so a field inside another
field (a FloatField of a Vector3Field) or inside a ListView,
TreeView or MultiColumnListView row returns false while it has focus.
Track such a field with FocusInEvent and FocusOutEvent instead.
SetDelegatesFocus<T>(T, bool)
Sets delegatesFocus.
public static T SetDelegatesFocus<T>(this T element, bool value) where T : Focusable
Parameters
element T
The element to modify.
value bool
When true, focus is delegated to the children.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
SetFocusable<T>(T, bool)
Sets focusable.
public static T SetFocusable<T>(this T element, bool value) where T : Focusable
Parameters
element T
The element to modify.
value bool
When true, the element can receive focus.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
SetTabIndex<T>(T, int)
Sets tabIndex.
public static T SetTabIndex<T>(this T element, int value) where T : Focusable
Parameters
element T
The element to modify.
value int
The tab index to set.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.