TextBox

Wisej.Web.TextBox

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.0.0.0)

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

public class TextBox : TextBoxBase

Constructors

TextBox()

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

TextBox(onTextChanged)

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

Name
Type
Description

onTextChanged

Handler for the TextChanged event.

TextBox(label, onTextChanged)

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

Name
Type
Description

label

The initial text to display in the TextBox label.

onTextChanged

Handler for the TextChanged event.

TextBox(location, size, onTextChanged)

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

Name
Type
Description

location

The location of the TextBox on its parent control.

size

The size of the TextBox.

onTextChanged

Handler for the TextChanged event.

TextBox(label, location, size, onTextChanged)

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

Name
Type
Description

label

The initial text to display in the TextBox label.

location

The location of the TextBox on its parent control.

size

The size of the TextBox.

onTextChanged

Handler for the TextChanged event.

Properties

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.

CharacterCasing

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

Checked

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

Filter

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

InputType

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

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.

ScrollBars

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

SpellCheck

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

Text

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

TextAlign

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

Methods

OnCheckedChanged(e)

Fires the CheckedChanged event.

Parameter
Type
Description

e

A EventArgs that contains the event data.

OnTextAlignChanged(e)

Fires the TextAlignChanged event.

Parameter
Type
Description

e

A EventArgs that contains the event data.

OnWebEvent(e)

Processes the event from the client.

Parameter
Type
Description

e

Event arguments.

OnWebRender(config)

Renders the client component.

Parameter
Type
Description

config

Dynamic configuration object.

PreProcessValue(value)

Applies any text transformation before saving the text property.

Parameter
Type
Description

value

Value to process before it's stored in the control.

Returns: String. The value store in the control.

ResetInputType()

Resets the InputType property.

Events

CheckedChanged

EventHandler Fired when the value of the Checked property changes.

TextAlignChanged

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

Inherited By

Name
Description

Represents a TextBox control that can be hosted in a DataGridViewTextBoxCell cell when the cell's WrapMode is set to False.

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

Implements

Name
Description

Provides access to the UserData and Tag properties associated to the component implementing this interface.

Bindable components implement this interface.

Controls that support drag & drop operations implement this interface.

Provides access to the LabelWrapper associated with the controls that implement this interface.

Provides access to the ReadOnly property for coontrols that support the read-only mode.

Provides access to the Modified property and ModifiedChanged event for controls that implement this interface.

Provides access to the validation events and properties property for controls that support validation.

All wisej components implement this interface.

All wisej controls derived from the Control class must implement this interface.

Allows an object to serialize itself.

Last updated

Was this helpful?