Skip to main content
Version: 4.1

TextBox

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.1.0.0)

Represents a text box control that allows the user to enter any value.

public class TextBox : TextBoxBase

Constructors

Instance member TextBox()

Initializes a new instance of the TextBox class with default settings.

Instance member TextBox(onTextChanged)

Initializes a new instance of the TextBox class with specific initial settings.

NameTypeDescription
onTextChangedAction<Object, EventArgs>Handler for the TextChanged event.

Instance member TextBox(label, onTextChanged)

Initializes a new instance of the TextBox class with specific initial settings.

NameTypeDescription
labelStringThe initial text to display in the TextBox label.
onTextChangedAction<Object, EventArgs>Handler for the TextChanged event.

Instance member TextBox(location, size, onTextChanged)

Initializes a new instance of the TextBox class with specific initial settings.

NameTypeDescription
locationPointThe location of the TextBox on its parent control.
sizeSizeThe size of the TextBox.
onTextChangedAction<Object, EventArgs>Handler for the TextChanged event.

Instance member TextBox(label, location, size, onTextChanged)

Initializes a new instance of the TextBox class with specific initial settings.

NameTypeDescription
labelStringThe initial text to display in the TextBox label.
locationPointThe location of the TextBox on its parent control.
sizeSizeThe size of the TextBox.
onTextChangedAction<Object, EventArgs>Handler for the TextChanged event.

Properties

Instance member AcceptsReturn

Boolean: Returns or sets whether pressing ENTER in a multiline TextBox control creates a new line of text in the control or activates the default accept button for the Form or Page. (Default: False)

If there is no accept button for the Form or Page, the ENTER key will always create a new line of text in the control, regardless of the value of this property. If the value of this property is false and there is an accept button defined on the AcceptButton or AcceptButton, the user must press SHIFT+ENTER to create a new line in a multiline TextBox control.

Instance member CharacterCasing

CharacterCasing: Returns or sets whether the TextBox control modifies the case of characters as they are typed. (Default: Normal)

Instance member Checked

Boolean: Returns whether the textbox with InputType set to Checkbox or Radio is checked.

Instance member Filter

String: Returns or sets a JavaScript regular expression that limits the characters that the user can type. (Default: null)

Instance member InputType

InputType: Specifies the type, min, max and step properties to associate to the <input> element.

Instance member PasswordChar

Char: Returns or sets the character used to mask characters of a password in a single-line TextBox control. (Default: "\0")

This property only enables/disables the password mode for the textbox. It doesn't change the password masking character used by the browser.

Instance member ScrollBars

ScrollBars: Returns or sets which scroll bars should appear. (Default: Both)

Instance member SpellCheck

Boolean: Returns or sets whether the text in the TextBox is spell checked by the browser. (Default: False)

Instance member Text

String: Returns or sets the current text in the text box. (Default: "")

Instance member TextAlign

HorizontalAlignment: Returns or sets how text is aligned in a TextBox control. (Default: Left)

Methods

Protected member OnCheckedChanged(e)

Fires the CheckedChanged event.

ParameterTypeDescription
eEventArgsA EventArgs that contains the event data.

Protected member OnTextAlignChanged(e)

Fires the TextAlignChanged event.

ParameterTypeDescription
eEventArgsA EventArgs that contains the event data.

Protected member OnWebEvent(e)

Processes the event from the client.

ParameterTypeDescription
eWisejEventArgsEvent arguments.

Protected member OnWebRender(config)

Renders the client component.

ParameterTypeDescription
configObjectDynamic configuration object.

Protected member PreProcessValue(value)

Applies any text transformation before saving the text property.

ParameterTypeDescription
valueStringValue to process before it's stored in the control.

Returns: String. The value store in the control.

Instance member ResetInputType()

Resets the InputType property.

Events

Instance member CheckedChanged

EventHandler Fired when the value of the Checked property changes.

Instance member TextAlignChanged

EventHandler Fired when the value of the TextAlign property has changed.

Inherited By

NameDescription
DataGridViewTextBoxEditingControlRepresents a TextBox control that can be hosted in a DataGridViewTextBoxCell cell when the cell's WrapMode is set to False.
TypedTextBoxRepresents a text box control that allows the user to enter a typed value.

Implements

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.
IBindableComponentBindable components implement this interface.
IDropTargetControls that support drag & drop operations implement this interface.
ILabelProvides access to the LabelWrapper associated with the controls that implement this interface.
IReadOnlyProvides access to the ReadOnly property for coontrols that support the read-only mode.
IModifiedProvides access to the Modified property and ModifiedChanged event for controls that implement this interface.
IValidationProvides access to the validation events and properties property for controls that support validation.
IWisejComponentAll wisej components implement this interface.
IWisejControlAll wisej controls derived from the Control class must implement this interface.
IWisejSerializableAllows an object to serialize itself.