Перейти к основному содержимому

Class TextInputBaseFieldStringTextSelectionExtensions

Namespace: Aspid.FastTools.UIElements
Assembly: Aspid.FastTools.dll

Provides text-selection extension methods for TextInputBaseField<T> of String.

public static class TextInputBaseFieldStringTextSelectionExtensions

Inheritance​

object ← TextInputBaseFieldStringTextSelectionExtensions

Methods​

AddOnCursorIndexChange<T>(T, Action)​

Subscribes to the OnCursorIndexChange event of textSelection.

public static T AddOnCursorIndexChange<T>(this T element, Action value) where T : TextInputBaseField<string>

Parameters​

element T

The element to modify.

value Action

The callback to subscribe.

Returns​

T

The element, for chaining.

Type Parameters​

T

The field type.

AddOnSelectIndexChange<T>(T, Action)​

Subscribes to the OnSelectIndexChange event of textSelection.

public static T AddOnSelectIndexChange<T>(this T element, Action value) where T : TextInputBaseField<string>

Parameters​

element T

The element to modify.

value Action

The callback to subscribe.

Returns​

T

The element, for chaining.

Type Parameters​

T

The field type.

RemoveOnCursorIndexChange<T>(T, Action)​

Unsubscribes from the OnCursorIndexChange event of textSelection.

public static T RemoveOnCursorIndexChange<T>(this T element, Action value) where T : TextInputBaseField<string>

Parameters​

element T

The element to modify.

value Action

The callback to remove.

Returns​

T

The element, for chaining.

Type Parameters​

T

The field type.

RemoveOnSelectIndexChange<T>(T, Action)​

Unsubscribes from the OnSelectIndexChange event of textSelection.

public static T RemoveOnSelectIndexChange<T>(this T element, Action value) where T : TextInputBaseField<string>

Parameters​

element T

The element to modify.

value Action

The callback to remove.

Returns​

T

The element, for chaining.

Type Parameters​

T

The field type.

SetCursorIndex<T>(T, int)​

Sets cursorIndex.

public static T SetCursorIndex<T>(this T element, int value) where T : TextInputBaseField<string>

Parameters​

element T

The element to modify.

value int

The cursor index to set.

Returns​

T

The element, for chaining.

Type Parameters​

T

The field type.

SetDoubleClickSelectsWord<T>(T, bool)​

Sets doubleClickSelectsWord.

public static T SetDoubleClickSelectsWord<T>(this T element, bool value) where T : TextInputBaseField<string>

Parameters​

element T

The element to modify.

value bool

When true, a double click selects the word under the pointer.

Returns​

T

The element, for chaining.

Type Parameters​

T

The field type.

SetSelectAllOnFocus<T>(T, bool)​

Sets selectAllOnFocus.

public static T SetSelectAllOnFocus<T>(this T element, bool value) where T : TextInputBaseField<string>

Parameters​

element T

The element to modify.

value bool

When true, the whole text is selected when the field receives focus.

Returns​

T

The element, for chaining.

Type Parameters​

T

The field type.

SetSelectAllOnMouseUp<T>(T, bool)​

Sets selectAllOnMouseUp.

public static T SetSelectAllOnMouseUp<T>(this T element, bool value) where T : TextInputBaseField<string>

Parameters​

element T

The element to modify.

value bool

When true, the whole text is selected on the first mouse up.

Returns​

T

The element, for chaining.

Type Parameters​

T

The field type.

SetSelectIndex<T>(T, int)​

Sets selectIndex.

public static T SetSelectIndex<T>(this T element, int value) where T : TextInputBaseField<string>

Parameters​

element T

The element to modify.

value int

The selection index to set.

Returns​

T

The element, for chaining.

Type Parameters​

T

The field type.

SetSelectable<T>(T, bool)​

Sets isSelectable of textSelection.

public static T SetSelectable<T>(this T element, bool value) where T : TextInputBaseField<string>

Parameters​

element T

The element to modify.

value bool

When true, the text can be selected.

Returns​

T

The element, for chaining.

Type Parameters​

T

The field type.

SetTripleClickSelectsLine<T>(T, bool)​

Sets tripleClickSelectsLine.

public static T SetTripleClickSelectsLine<T>(this T element, bool value) where T : TextInputBaseField<string>

Parameters​

element T

The element to modify.

value bool

When true, a triple click selects the line under the pointer.

Returns​

T

The element, for chaining.

Type Parameters​

T

The field type.