Skip to main content
Version: 4.1

TextBoxExtensions

Namespace: Wisej.Web.Markup

Assembly: Wisej.Framework (4.1.0.0)

Adds fluent markup extension methods to the TextBox class.

public class TextBoxExtensions

Methods

Static member AcceptsReturn<TTextBox>(textBox, value)

Sets whether the specified TextBox control accepts the Return key.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBox.
textBoxTTextBoxThe text box for which to set the AcceptsReturn property.
valueBooleanA boolean value indicating whether the Return key is accepted.

Returns: TTextBox. The modified text box with the updated AcceptsReturn property.

This method allows you to configure the text box to accept or ignore the Return key.


myTextBox.AcceptsReturn(true);

Static member AcceptsTab<TTextBox>(textBox, acceptTab)

Sets whether the specified TextBoxBase control accepts the Tab key.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box for which to set the AcceptsTab property.
acceptTabBooleanA boolean value indicating whether the Tab key is accepted.

Returns: TTextBox. The modified text box with the updated AcceptsTab property.

Static member AllowDuplicateTags<TTextBox>(tagTextBox, value)

Sets whether duplicate tags are allowed in the specified TagTextBox.

ParameterTypeDescription
TTextBoxThe type of the tag text box, must inherit from TagTextBox.
tagTextBoxTTextBoxThe tag text box for which to set the AllowDuplicateTags property.
valueBooleanA boolean value indicating whether duplicate tags are allowed.

Returns: TTextBox. The modified tag text box with the updated AllowDuplicateTags property.

This method allows you to specify whether the text box can accept duplicate tag entries.


myTagTextBox.AllowDuplicateTags(false);

Static member AutoComplete<TTextBox>(textBox, autoComplete)

Sets the auto-complete behavior for the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box for which to set the auto-complete behavior.
autoCompleteAutoCompleteThe auto-complete behavior to set.

Returns: TTextBox. The modified text box with the updated auto-complete behavior.

Static member AutoCompleteList<TTextBox>(textBox, list)

Sets the list of auto-complete options for the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box for which to set the auto-complete list.
listString[]An array of strings representing the auto-complete options.

Returns: TTextBox. The modified text box with the updated auto-complete list.

Static member BorderStyle<TTextBox>(textBox, borderStyle)

Sets the border style of the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box for which to set the border style.
borderStyleBorderStyleThe border style to set.

Returns: TTextBox. The modified text box with the updated border style.

Static member CharacterCasing<TTextBox>(textBox, characterCasing)

Sets the character casing for the specified TextBox.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBox.
textBoxTTextBoxThe text box for which to set the character casing.
characterCasingCharacterCasingThe CharacterCasing value to set.

Returns: TTextBox. The modified text box with the updated character casing.

This method allows you to control the character casing for the text entered into the text box.


myTextBox.CharacterCasing(CharacterCasing.Upper);

Static member Checked<TTextBox>(textBox, value)

Sets the checked state of the specified TextBox.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBox.
textBoxTTextBoxThe text box for which to set the checked state.
valueBooleanA boolean value indicating the checked state of the text box.

Returns: TTextBox. The modified text box with the updated checked state.

This method allows you to set the checked state for a text box control that supports a checked property.


myTextBox.Checked(true);

Static member Culture<TTextBox>(typedTextBox, cultureInfo)

Sets the culture information to use for displaying and interpreting the value in the specified TypedTextBox.

ParameterTypeDescription
TTextBoxThe type of the typed text box, must inherit from TypedTextBox.
typedTextBoxTTextBoxThe typed text box to attach the culture information to.
cultureInfoCultureInfoThe CultureInfo to use for formatting and parsing the value in the text box.

Returns: TTextBox. The modified typed text box with the updated culture information.

This method allows you to set the culture information, which can affect how numbers, dates, and other data types are displayed or parsed in the typed text box.


myTypedTextBox.Culture(new CultureInfo("en-US"));

Static member CustomFormat<TTextBox>(typedTextBox, customFormat)

Sets a custom format string for the specified TypedTextBox.

ParameterTypeDescription
TTextBoxThe type of the typed text box, must inherit from TypedTextBox.
typedTextBoxTTextBoxThe typed text box for which to set the custom format.
customFormatStringThe custom format string to apply to the value in the text box.

Returns: TTextBox. The modified typed text box with the updated custom format.

This method allows you to define a custom format string for displaying the value within the typed text box.


myTypedTextBox.CustomFormat("C2");

Static member Filter<TTextBox>(textBox, filter)

Sets a filter string for the specified TextBox.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBox.
textBoxTTextBoxThe text box for which to set the filter string.
filterStringThe filter string to apply to the text box.

Returns: TTextBox. The modified text box with the applied filter string.

This extension method allows you to apply a filter to the text box content, possibly for validation or searching purposes.


myTextBox.Filter("^[a-zA-Z]+$");

Static member InputType<TTextBox>(textBox, value)

Sets the input type for the specified TextBox.

ParameterTypeDescription
TTextBoxThe type of the TextBox.
textBoxTTextBoxThe TextBox instance to set the input type for.
valueInputTypeThe input type to be set.

Returns: TTextBox. The TextBox instance with the updated input type.

This method allows you to specify the input type for a TextBox control, which can be useful for customizing the behavior of the text input.


TextBox myTextBox = new TextBox();
myTextBox.InputType(InputType.Email);

Static member Invalid<TTextBox>(textBox, invalid)

Sets the invalid status of the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box for which to set the invalid status.
invalidBooleanA boolean value indicating whether the text box is invalid.

Returns: TTextBox. The modified text box with the updated invalid status.

Static member InvalidMessage<TTextBox>(textBox, message)

Sets the invalid message for the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box for which to set the invalid message.
messageStringThe invalid message to display.

Returns: TTextBox. The modified text box with the updated invalid message.

Static member KeepFormatOnEnter<TTextBox>(typedTextBox, value)

Sets whether the format of the specified TypedTextBox should be retained when the text box is entered.

ParameterTypeDescription
TTextBoxThe type of the typed text box, must inherit from TypedTextBox.
typedTextBoxTTextBoxThe typed text box for which to set the KeepFormatOnEnter property.
valueBooleanA boolean value indicating whether the formatting should be retained on enter.

Returns: TTextBox. The modified typed text box with the updated KeepFormatOnEnter property.

This method allows you to specify whether the formatting of the value should be retained when the text box is entered.


myTypedTextBox.KeepFormatOnEnter(true);

Static member KeepWatermark<TTextBox>(tagTextBox, value)

Sets whether the watermark text should remain visible when the specified TagTextBox loses focus.

ParameterTypeDescription
TTextBoxThe type of the tag text box, must inherit from TagTextBox.
tagTextBoxTTextBoxThe tag text box for which to set the KeepWatermark property.
valueBooleanA boolean value indicating whether the watermark should remain visible when the text box loses focus.

Returns: TTextBox. The modified tag text box with the updated KeepWatermark property.

This method allows you to specify whether the watermark text should persist when the text box loses focus.


myTagTextBox.KeepWatermark(false);

Static member Lines<TTextBox>(textBox, lines)

Sets the lines of text in the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box for which to set the lines of text.
linesString[]The lines of text to set.

Returns: TTextBox. The modified text box with the updated lines of text.

Static member Max<TInputType>(inputType, value)

Sets the maximum value for the input element.

ParameterTypeDescription
TInputTypeThe type of the input element, which must inherit from InputType.
inputTypeTInputTypeThe input element to set the maximum value for.
valueStringThe maximum value as a string.

Returns: TInputType. The modified input element with the specified maximum value.

Static member MaxLength<TTextBox>(textBox, length)

Sets the maximum number of characters that can be entered into the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box for which to set the maximum length.
lengthInt32The maximum number of characters.

Returns: TTextBox. The modified text box with the updated maximum length.

Static member MaxTagCount<TTextBox>(tagTextBox, count)

Sets the maximum number of tags that can be added to the specified TagTextBox.

ParameterTypeDescription
TTextBoxThe type of the tag text box, must inherit from TagTextBox.
tagTextBoxTTextBoxThe tag text box for which to set the maximum tag count.
countInt32The maximum number of tags allowed.

Returns: TTextBox. The modified tag text box with the updated maximum tag count.

This method allows you to specify the maximum number of tags that can be added to the tag text box. If more tags are added than the specified count, they may be ignored or removed.


myTagTextBox.MaxTagCount(5);

Static member MaxTagWidth<TTextBox>(tagTextBox, width)

Sets the maximum width for each tag in the specified TagTextBox.

ParameterTypeDescription
TTextBoxThe type of the tag text box, must inherit from TagTextBox.
tagTextBoxTTextBoxThe tag text box for which to set the maximum tag width.
widthInt32The maximum width of each tag in pixels.

Returns: TTextBox. The modified tag text box with the updated maximum tag width.

This method allows you to limit the width of each tag within the tag text box. Tags exceeding the specified width may be truncated or otherwise adjusted.


myTagTextBox.MaxTagWidth(100);

Static member Min<TInputType>(inputType, value)

Sets the minimum value for the input element.

ParameterTypeDescription
TInputTypeThe type of the input element, which must inherit from InputType.
inputTypeTInputTypeThe input element to set the minimum value for.
valueStringThe minimum value as a string.

Returns: TInputType. The modified input element with the specified minimum value.

Static member Mode<TInputType>(inputType, value)

Sets the mode of the input element.

ParameterTypeDescription
TInputTypeThe type of the input element, which must inherit from InputType.
inputTypeTInputTypeThe input element to set the mode for.
valueTextBoxModeThe TextBoxMode value to set as the mode.

Returns: TInputType. The modified input element with the specified mode.

Static member Multiline<TTextBox>(textBox, multiLine)

Sets the Multiline property for the specified TextBox, enabling or disabling multiline text input.

ParameterTypeDescription
TTextBoxThe type of the text box, which must inherit from TextBox.
textBoxTTextBoxThe text box for which to set the Multiline property.
multiLineBooleanA boolean value indicating whether to enable multiline text input. Default is false.

Returns: TTextBox. The text box with the updated Multiline property.

This method allows you to specify whether the text box can accept multiple lines of text.


myTextBox.Multiline(true);

Static member OnAcceptsTabChanged<TTextBox>(textBox, action)

Adds an event handler for the AcceptsTabChanged event of the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box to attach the event handler to.
actionAction<TTextBox>An action to execute when the AcceptsTab property changes.

Returns: TTextBox. The text box with the attached event handler.

This extension method allows you to easily attach an action to execute when the AcceptsTab property of the text box changes.


myTextBox.OnAcceptsTabChanged(tb =>
{
AlertBox.Show("AcceptsTab property changed!");
});

Static member OnCheckedChanged<TTextBox>(textBox, action)

Sets a checked state change event handler for the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box to attach the event handler to.
actionAction<TTextBox>An action to execute when the checked state changes.

Returns: TTextBox. The modified text box with the attached CheckedChanged event handler.

This method allows you to add an event handler for the CheckedChanged event, which occurs when the checked state changes.


myTextBox.OnCheckedChanged(tb =>
{
AlertBox.Show("Checked state changed!");
});

Static member OnCultureChanged<TTextBox>(typedTextBox, action)

Attaches an event handler for the CultureChanged event of the specified TypedTextBox.

ParameterTypeDescription
TTextBoxThe type of the typed text box, must inherit from TypedTextBox.
typedTextBoxTTextBoxThe typed text box to attach the event handler to.
actionAction<TTextBox>An action to execute when the Culture property changes.

Returns: TTextBox. The modified typed text box with the attached CultureChanged event handler.

This method allows you to execute a custom action whenever the Culture property of the typed text box changes.


myTypedTextBox.OnCultureChanged(tb =>
{
AlertBox.Show("Culture changed!");
});

Static member OnCustomFormatChanged<TTextBox>(typedTextBox, action)

Attaches an event handler for the CustomFormatChanged event of the specified TypedTextBox.

ParameterTypeDescription
TTextBoxThe type of the typed text box, must inherit from TypedTextBox.
typedTextBoxTTextBoxThe typed text box to attach the event handler to.
actionAction<TTextBox>An action to execute when the CustomFormat property changes.

Returns: TTextBox. The modified typed text box with the attached CustomFormatChanged event handler.

This method allows you to execute a custom action whenever the CustomFormat property of the typed text box changes.


myTypedTextBox.OnCustomFormatChanged(tb =>
{
AlertBox.Show("Custom format changed!");
});

Static member OnFormat<TTextBox>(typedTextBox, action)

Attaches an event handler for the Format event of the specified TypedTextBox.

ParameterTypeDescription
TTextBoxThe type of the typed text box, must inherit from TypedTextBox.
typedTextBoxTTextBoxThe typed text box to attach the event handler to.
actionAction<TTextBox, ConvertEventArgs>An action to execute during the Format event, with the text box and event arguments as parameters.

Returns: TTextBox. The modified typed text box with the attached Format event handler.

This method allows you to define custom formatting logic by executing a specified action during the Format event.


myTypedTextBox.OnFormat((tb, args) =>
{
// Custom formatting logic
});

Static member OnMultilineChanged<TTextBox>(textBox, action)

Adds an event handler for the MultilineChanged event of the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box to attach the event handler to.
actionAction<TTextBox>An action to execute when the Multiline property changes.

Returns: TTextBox. The text box with the attached event handler.

This extension method allows you to easily attach an action to execute when the Multiline property of the text box changes.


myTextBox.OnMultilineChanged(tb =>
{
AlertBox.Show("Multiline property changed!");
});

Static member OnParse<TTextBox>(typedTextBox, action)

Attaches an event handler for the Parse event of the specified TypedTextBox.

ParameterTypeDescription
TTextBoxThe type of the typed text box, must inherit from TypedTextBox.
typedTextBoxTTextBoxThe typed text box to attach the event handler to.
actionAction<TTextBox, ConvertEventArgs>An action to execute during the Parse event, with the text box and event arguments as parameters.

Returns: TTextBox. The modified typed text box with the attached Parse event handler.

This method allows you to define custom parsing logic by executing a specified action during the Parse event.


myTypedTextBox.OnParse((tb, args) =>
{
// Custom parsing logic
});

Static member OnSeperatorCharChanged<TTextBox>(tagTextBox, action)

Attaches an event handler for the SeparatorCharChanged event of the specified TagTextBox.

ParameterTypeDescription
TTextBoxThe type of the tag text box, must inherit from TagTextBox.
tagTextBoxTTextBoxThe tag text box to attach the event handler to.
actionAction<TTextBox>An action to execute when the SeparatorChar property changes.

Returns: TTextBox. The modified tag text box with the attached SeparatorCharChanged event handler.

This method allows you to add custom behavior when the SeparatorChar property of the tag text box changes.


myTagTextBox.OnSeperatorCharChanged(tb =>
{
AlertBox.Show("Separator character changed!");
});

Static member OnTagAdded<TTextBox>(tagTextBox, action)

Attaches an event handler for the TagAdded event of the specified TagTextBox.

ParameterTypeDescription
TTextBoxThe type of the tag text box, must inherit from TagTextBox.
tagTextBoxTTextBoxThe tag text box to attach the event handler to.
actionAction<TTextBox, TagTextBoxEventArgs>An action to execute when a tag is added.

Returns: TTextBox. The modified tag text box with the attached TagAdded event handler.

This method allows you to execute a custom action when a new tag is added to the tag text box.


myTagTextBox.OnTagAdded((tb, args) =>
{
AlertBox.Show("Tag added: " + args.Tag);
});

Static member OnTagClick<TTextBox>(tagTextBox, action)

Attaches an event handler for the TagClick event of the specified TagTextBox.

ParameterTypeDescription
TTextBoxThe type of the tag text box, must inherit from TagTextBox.
tagTextBoxTTextBoxThe tag text box to attach the event handler to.
actionAction<TTextBox, TagTextBoxMousEventArgs>An action to execute when a tag is clicked.

Returns: TTextBox. The modified tag text box with the attached TagClick event handler.

This method allows you to add an event handler for the TagClick event, executing a custom action when a tag is clicked.


myTagTextBox.OnTagClick((tb, args) =>
{
AlertBox.Show("Tag clicked: " + args.Tag);
});

Static member OnTagDoubleClick<TTextBox>(tagTextBox, action)

Attaches an event handler for the TagDoubleClick event of the specified TagTextBox.

ParameterTypeDescription
TTextBoxThe type of the tag text box, must inherit from TagTextBox.
tagTextBoxTTextBoxThe tag text box to attach the event handler to.
actionAction<TTextBox, TagTextBoxMousEventArgs>An action to execute when a tag is double-clicked.

Returns: TTextBox. The modified tag text box with the attached TagDoubleClick event handler.

This method allows you to add an event handler for the TagDoubleClick event, allowing you to define custom behavior when a tag is double-clicked.


myTagTextBox.OnTagDoubleClick((tb, args) =>
{
AlertBox.Show("Tag double-clicked: " + args.Tag);
});

Static member OnTagRejected<TTextBox>(tagTextBox, action)

Attaches an event handler for the TagRejected event of the specified TagTextBox.

ParameterTypeDescription
TTextBoxThe type of the tag text box, must inherit from TagTextBox.
tagTextBoxTTextBoxThe tag text box to attach the event handler to.
actionAction<TTextBox, TagTextBoxEventArgs>An action to execute when a tag is rejected.

Returns: TTextBox. The modified tag text box with the attached TagRejected event handler.

This method allows you to add an event handler for the TagRejected event, which occurs when a tag is not accepted for some reason.


myTagTextBox.OnTagRejected((tb, args) =>
{
AlertBox.Show("Tag rejected: " + args.Tag);
});

Static member OnTagRemoved<TTextBox>(tagTextBox, action)

Adds an event handler for the TagRemoved event of the specified TagTextBox.

ParameterTypeDescription
TTextBoxThe type of the tag text box, must inherit from TagTextBox.
tagTextBoxTTextBoxThe tag text box to attach the event handler to.
actionAction<TTextBox, TagTextBoxEventArgs>An action to execute when a tag is removed.

Returns: TTextBox. The modified tag text box with the attached TagRemoved event handler.

This extension method allows you to provide an action that will be executed when a tag is removed from the tag text box.


myTagTextBox.OnTagRemoved((tb, args) =>
{
AlertBox.Show("Tag removed: " + args.Tag);
});

Static member OnTagRender<TTextBox>(tagTextBox, action)

Attaches an event handler for the TagRender event of the specified TagTextBox.

ParameterTypeDescription
TTextBoxThe type of the tag text box, must inherit from TagTextBox.
tagTextBoxTTextBoxThe tag text box to attach the event handler to.
actionAction<TTextBox, TagTextBoxRenderEventArgs>An action to execute when a tag is rendered.

Returns: TTextBox. The modified tag text box with the attached TagRender event handler.

This method allows you to define a custom action for rendering tags within the tag text box.


myTagTextBox.OnTagRender((tb, args) =>
{
// Custom rendering logic
});

Static member OnTagSelected<TTextBox>(tagTextBox, action)

Attaches an event handler for the TagSelected event of the specified TagTextBox.

ParameterTypeDescription
TTextBoxThe type of the tag text box, must inherit from TagTextBox.
tagTextBoxTTextBoxThe tag text box to attach the event handler to.
actionAction<TTextBox, TagTextBoxEventArgs>An action to execute when a tag is selected.

Returns: TTextBox. The modified tag text box with the attached TagSelected event handler.

This method allows you to execute a custom action when a tag is selected within the tag text box.


myTagTextBox.OnTagSelected((tb, args) =>
{
AlertBox.Show("Tag selected: " + args.Tag);
});

Static member OnTextAlignChanged<TTextBox>(textBox, action)

Attaches an event handler to the TextAlignChanged event of the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box to attach the event handler to.
actionAction<TTextBox>An action to execute when the text alignment changes.

Returns: TTextBox. The modified text box with the attached TextAlignChanged event handler.

This method is used to add an event handler for the TextAlignChanged event, which occurs when the alignment of the text changes.


myTextBox.OnTextAlignChanged(tb =>
{
AlertBox.Show("Text alignment changed!");
});

Static member OnToolClick<TTextBox>(textBox, action)

Attaches an event handler to the ToolClick event of the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box to attach the event handler to.
actionAction<TTextBox, ToolClickEventArgs>An action to execute when a tool is clicked.

Returns: TTextBox. The modified text box with the attached ToolClick event handler.

This method is used to add an event handler for the ToolClick event, which occurs when a tool button is clicked.


myTextBox.OnToolClick((tb, tool) =>
{
AlertBox.Show($"Tool clicked: {tool.ToolName}");
});

Static member OnValueChanged<TTextBox>(typedTextBox, action)

Attaches an event handler for the ValueChanged event of the specified TypedTextBox.

ParameterTypeDescription
TTextBoxThe type of the typed text box, must inherit from TypedTextBox.
typedTextBoxTTextBoxThe typed text box to attach the event handler to.
actionAction<TTextBox>An action to execute when the Value property changes.

Returns: TTextBox. The modified typed text box with the attached ValueChanged event handler.

This method allows you to execute a custom action whenever the Value property of the typed text box changes.


myTypedTextBox.OnValueChanged(tb =>
{
AlertBox.Show("Value changed!");
});

Static member OnValueTypeChanged<TTextBox>(typedTextBox, action)

Attaches an event handler for the ValueTypeChanged event of the specified TypedTextBox.

ParameterTypeDescription
TTextBoxThe type of the typed text box, must inherit from TypedTextBox.
typedTextBoxTTextBoxThe typed text box to attach the event handler to.
actionAction<TTextBox>An action to execute when the ValueType property changes.

Returns: TTextBox. The modified typed text box with the attached ValueTypeChanged event handler.

This method enables the execution of a custom action whenever the ValueType property of the typed text box changes.


myTypedTextBox.OnValueTypeChanged(tb =>
{
AlertBox.Show("Value type changed!");
});

Static member PasswordChar<TTextBox>(textBox, passwordChar)

Sets the password character for the specified TextBox.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBox.
textBoxTTextBoxThe text box for which to set the password character.
passwordCharCharThe character to display for password input.

Returns: TTextBox. The modified text box with the updated password character.

This method allows you to specify a character to display in place of the actual characters typed for password input.


myTextBox.PasswordChar('*');

Static member ScrollBars<TTextBox>(textBox, scrollBars)

Sets the scroll bars for the specified TextBox.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBox.
textBoxTTextBoxThe text box for which to set the scroll bars.
scrollBarsScrollBarsThe ScrollBars value to set.

Returns: TTextBox. The modified text box with the updated scroll bars.

This method allows you to configure the scroll bars for the text box.


myTextBox.ScrollBars(ScrollBars.Both);

Static member Selectable<TTextBox>(textBox, selectable)

Sets the selectable status of the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box for which to set the selectable status.
selectableBooleanA boolean value indicating whether the text box is selectable.

Returns: TTextBox. The modified text box with the updated selectable status.

Static member SelectedText<TTextBox>(textBox, text)

Sets the selected text in the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box for which to set the selected text.
textStringThe text to select.

Returns: TTextBox. The modified text box with the updated selected text.

Static member SelectionLength<TTextBox>(textBox, length)

Sets the length of the selected text in the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box for which to set the selection length.
lengthInt32The length of the selection.

Returns: TTextBox. The modified text box with the updated selection length.

Static member SelectionStart<TTextBox>(textBox, index)

Sets the starting position of the text selection in the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box for which to set the selection start.
indexInt32The zero-based index of the selection start.

Returns: TTextBox. The modified text box with the updated selection start.

Static member SelectOnEnter<TTextBox>(textBox, selectOnEnter)

Sets whether the entire text is selected when the specified TextBoxBase is entered.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box for which to set the SelectOnEnter property.
selectOnEnterBooleanA boolean value indicating whether the text should be selected on enter.

Returns: TTextBox. The modified text box with the updated SelectOnEnter property.

Static member SeparatorChar<TTextBox>(tagTextBox, separator)

Sets the character used to separate tags in the specified TagTextBox.

ParameterTypeDescription
TTextBoxThe type of the tag text box, must inherit from TagTextBox.
tagTextBoxTTextBoxThe tag text box for which to set the separator character.
separatorCharThe character to use as a separator between tags.

Returns: TTextBox. The modified tag text box with the updated separator character.

This method allows you to customize the character that separates tags within the text box.


myTagTextBox.SeparatorChar(',');

Static member ShowToolTips<TTextBox>(tagTextBox, value)

Sets whether tooltips are shown for tags in the specified TagTextBox.

ParameterTypeDescription
TTextBoxThe type of the tag text box, must inherit from TagTextBox.
tagTextBoxTTextBoxThe tag text box for which to set the tooltips visibility.
valueBooleanA boolean value indicating whether tooltips should be shown for tags.

Returns: TTextBox. The modified tag text box with the updated tooltip visibility setting.

This extension method allows you to enable or disable the display of tooltips for tags within the text box. Tooltips can provide additional information about each tag.


myTagTextBox.ShowToolTips(true);

Static member SpellCheck<TTextBox>(textBox, value)

Enables or disables spell checking for the specified TextBox.

ParameterTypeDescription
TTextBoxThe type of the TextBox.
textBoxTTextBoxThe TextBox instance to set spell checking for.
valueBooleanA boolean value indicating whether spell checking should be enabled or disabled.

Returns: TTextBox. The TextBox instance with the updated spell check setting.

This method allows you to enable or disable spell checking for a TextBox control, which can be useful for providing feedback on text input.


TextBox myTextBox = new TextBox();
myTextBox.SpellCheck(true);

Static member Step<TInputType>(inputType, value)

Sets the step value for the input element.

ParameterTypeDescription
TInputTypeThe type of the input element, which must inherit from InputType.
inputTypeTInputTypeThe input element to set the step value for.
valueNullable<Double>The step value as a nullable double. If null, the step attribute will be removed.

Returns: TInputType. The modified input element with the specified step value.

Static member TextAlign<TTextBox>(textBox, textAlign)

Sets the horizontal text alignment for the specified TextBox.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBox.
textBoxTTextBoxThe text box for which to set the text alignment.
textAlignHorizontalAlignmentThe HorizontalAlignment value to set.

Returns: TTextBox. The modified text box with the updated text alignment.

This method allows you to set the horizontal alignment of text within the text box.


myTextBox.TextAlign(HorizontalAlignment.Center);

Static member Tools<TTextBox>(textBox, toolBarButtons)

Adds a collection of tool bar buttons to the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box to which the tool bar buttons will be added.
toolBarButtonsComponentTool[]An array of ComponentTool representing the tool bar buttons to add.

Returns: TTextBox. The modified text box with the added tool bar buttons.

Static member Type<TInputType>(inputType, value)

Sets the type of the input element.

ParameterTypeDescription
TInputTypeThe type of the input element, which must inherit from InputType.
inputTypeTInputTypeThe input element to set the type for.
valueTextBoxTypeThe TextBoxType value to set as the type.

Returns: TInputType. The modified input element with the specified type.

Static member Value<TTextBox>(typedTextBox, value)

Sets the value of the specified TypedTextBox.

ParameterTypeDescription
TTextBoxThe type of the typed text box, must inherit from TypedTextBox.
typedTextBoxTTextBoxThe typed text box for which to set the value.
valueObjectThe value to be set in the typed text box.

Returns: TTextBox. The modified typed text box with the updated value.

This method allows you to set a value into the typed text box, which will be converted to a string representation according to the text box's ValueType and Culture settings.


myTypedTextBox.Value(123.45);

Static member Watermark<TTextBox>(textBox, watermark)

Sets the watermark text for the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box for which to set the watermark text.
watermarkStringThe watermark text to display.

Returns: TTextBox. The modified text box with the updated watermark text.

Static member WordWrap<TTextBox>(textBox, wrap)

Sets the word wrap status of the specified TextBoxBase.

ParameterTypeDescription
TTextBoxThe type of the text box, must inherit from TextBoxBase.
textBoxTTextBoxThe text box for which to set the word wrap status.
wrapBooleanA boolean value indicating whether the text should wrap.

Returns: TTextBox. The modified text box with the updated word wrap status.