# TypedTextBox

URL: https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox

Version: 4.1
Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.1.0.0)

- Control
- [TextBoxBase](/api/wisej.web/editors/wisej.web.textboxbase)
- [TextBox](/api/wisej.web/editors/wisej.web.textbox)
- [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox)
Represents a text box control that allows the user to enter a typed value.

- C# - VB.NET

```csharp
public class TypedTextBox : TextBox
```

```visual
Public Class TypedTextBox
    Inherits TextBox
```

## Constructors

### ![Instance member](/img/api/instance.png) TypedTextBox()

Initializes a new instance of [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox) .

### ![Instance member](/img/api/instance.png) TypedTextBox(onTextChanged)

Initializes a new instance of the [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox) class with specific initial settings.

| Name | Type | Description | **onTextChanged** | [Action<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | Handler for the [TextChanged](/api/wisej.web/general/control/#textchanged) event. 

### ![Instance member](/img/api/instance.png) TypedTextBox(label, onTextChanged)

Initializes a new instance of the [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox) class with specific initial settings.

| Name | Type | Description | **label** | [String](https://docs.microsoft.com/dotnet/api/system.string) | The initial text to display in the [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox) label. | **onTextChanged** | [Action<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | Handler for the [TextChanged](/api/wisej.web/general/control/#textchanged) event. 

### ![Instance member](/img/api/instance.png) TypedTextBox(location, size, onTextChanged)

Initializes a new instance of the [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox) class with specific initial settings.

| Name | Type | Description | **location** | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) | The location of the [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox) on its parent control. | **size** | [Size](https://docs.microsoft.com/dotnet/api/system.drawing.size) | The size of the [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox) . | **onTextChanged** | [Action<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | Handler for the [TextChanged](/api/wisej.web/general/control/#textchanged) event. 

### ![Instance member](/img/api/instance.png) TypedTextBox(label, location, size, onTextChanged)

Initializes a new instance of the [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox) class with specific initial settings.

| Name | Type | Description | **label** | [String](https://docs.microsoft.com/dotnet/api/system.string) | The initial text to display in the [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox) label. | **location** | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) | The location of the [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox) on its parent control. | **size** | [Size](https://docs.microsoft.com/dotnet/api/system.drawing.size) | The size of the [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox) . | **onTextChanged** | [Action<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | Handler for the [TextChanged](/api/wisej.web/general/control/#textchanged) event. 

## Properties

### ![Instance member](/img/api/instance.png) Culture

[CultureInfo](https://docs.microsoft.com/dotnet/api/system.globalization.cultureinfo) : Returns or sets the culture used to parse and format the typed value.

### ![Instance member](/img/api/instance.png) CustomFormat

[String](https://docs.microsoft.com/dotnet/api/system.string) : Returns or sets the format string to use when formatting the value to display in the editor control. Supports all .NET format types, see [formatting-types](https://learn.microsoft.com/en-us/dotnet/standard/base-types/formatting-types) . (Default: `null` )

### ![Instance member](/img/api/instance.png) KeepFormatOnEnter

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) : Returns or sets whether the formatted text should be preserved when the editor gains the focus. (Default: `True` )

### ![Instance member](/img/api/instance.png) Text

[String](https://docs.microsoft.com/dotnet/api/system.string) : Returns or sets the current text in the text box. (Default: `""` )

### ![Instance member](/img/api/instance.png) Value

[Object](https://docs.microsoft.com/dotnet/api/system.object) : Returns or sets the value parsed to a [ValueType](/api/wisej.web/editors/wisej.web.typedtextbox#valuetype) object. (Default: `null` )

### ![Instance member](/img/api/instance.png) ValueType

[Type](https://docs.microsoft.com/dotnet/api/system.type) : Returns or sets the [Type](https://docs.microsoft.com/dotnet/api/system.type) of the value of the [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox) . (Default: `System.String` )

## Methods

### ![Protected member](/img/api/protected.png) OnCultureChanged(e)

Fires the [CultureChanged](/api/wisej.web/editors/wisej.web.typedtextbox#culturechanged) event.

| Parameter | Type | Description | **e** | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | Event data. 

### ![Protected member](/img/api/protected.png) OnCustomFormatChanged(e)

Fires the [CustomFormatChanged](/api/wisej.web/editors/wisej.web.typedtextbox#customformatchanged) event.

| Parameter | Type | Description | **e** | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | Event data. 

### ![Protected member](/img/api/protected.png) OnFormat(e)

Fires the [Format](/api/wisej.web/editors/wisej.web.typedtextbox#format) event.

| Parameter | Type | Description | **e** | [ConvertEventArgs](/api/wisej.web/data-binding/wisej.web.converteventargs) | Event data. 

### ![Protected member](/img/api/protected.png) OnGotFocus(e)

| Parameter | Type | Description | **e** | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | 

### ![Protected member](/img/api/protected.png) OnParse(e)

Fires the [Parse](/api/wisej.web/editors/wisej.web.typedtextbox#parse) event.

| Parameter | Type | Description | **e** | [ConvertEventArgs](/api/wisej.web/data-binding/wisej.web.converteventargs) | Event data. 

### ![Protected member](/img/api/protected.png) OnTextChanged(e)

Fires the [TextChanged](/api/wisej.web/general/control/#textchanged) event.

| Parameter | Type | Description | **e** | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | An [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. 

### ![Protected member](/img/api/protected.png) OnValidating(e)

| Parameter | Type | Description | **e** | [CancelEventArgs](https://docs.microsoft.com/dotnet/api/system.componentmodel.canceleventargs) | 

### ![Protected member](/img/api/protected.png) OnValueChanged(e)

Fires the [ValueChanged](/api/wisej.web/editors/wisej.web.typedtextbox#valuechanged) event.

| Parameter | Type | Description | **e** | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | Event data. 

### ![Protected member](/img/api/protected.png) OnValueTypeChanged(e)

Fires the [ValueTypeChanged](/api/wisej.web/editors/wisej.web.typedtextbox#valuetypechanged) event.

| Parameter | Type | Description | **e** | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | Event data. 

## Events

### ![Instance member](/img/api/instance.png) CultureChanged

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the value of the [Culture](/api/wisej.web/editors/wisej.web.typedtextbox#culture) property has changed.

### ![Instance member](/img/api/instance.png) CustomFormatChanged

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the value of the [CustomFormat](/api/wisej.web/editors/wisej.web.typedtextbox#customformat) property has changed.

### ![Instance member](/img/api/instance.png) Format

[ConvertEventHandler](/api/wisej.web/data-binding/wisej.web.converteventhandler) Fired when the value control formats the typed [Value](/api/wisej.web/editors/wisej.web.typedtextbox#value) to display it to the user.

### ![Instance member](/img/api/instance.png) Parse

[ConvertEventHandler](/api/wisej.web/data-binding/wisej.web.converteventhandler) Fired when the control parses the text into the typed [Value](/api/wisej.web/editors/wisej.web.typedtextbox#value) .

### ![Instance member](/img/api/instance.png) ValueChanged

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the value of the [Value](/api/wisej.web/editors/wisej.web.typedtextbox#value) property has changed.

### ![Instance member](/img/api/instance.png) ValueTypeChanged

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the value of the [ValueType](/api/wisej.web/editors/wisej.web.typedtextbox#valuetype) property has changed.

## Implements

| Name | Description | [IUserData](/api/wisej.web/interfaces/wisej.web.iuserdata) | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface. | [IBindableComponent](/api/wisej.web/data-binding/wisej.web.ibindablecomponent) | Bindable components implement this interface. | [IDropTarget](/api/wisej.web/interfaces/wisej.web.idroptarget) | Controls that support drag & drop operations implement this interface. | [ILabel](/api/wisej.web/interfaces/wisej.web.ilabel) | Provides access to the [LabelWrapper](/api/wisej.web/editors/wisej.web.labelwrapper) associated with the controls that implement this interface. | [IReadOnly](/api/wisej.web/interfaces/wisej.web.ireadonly) | Provides access to the [ReadOnly](/api/wisej.web/interfaces/wisej.web.ireadonly#readonly) property for coontrols that support the read-only mode. | [IModified](/api/wisej.web/interfaces/wisej.web.imodified) | Provides access to the [Modified](/api/wisej.web/interfaces/wisej.web.imodified#modified) property and [ModifiedChanged](/api/wisej.web/interfaces/wisej.web.imodified#modifiedchanged) event for controls that implement this interface. | [IValidation](/api/wisej.web/interfaces/wisej.web.ivalidation) | Provides access to the validation events and properties property for controls that support validation. | [IWisejComponent](/api/wisej.core/interfaces/wisej.core.iwisejcomponent) | All wisej components implement this interface. | [IWisejControl](/api/wisej.core/interfaces/wisej.core.iwisejcontrol) | All wisej controls derived from theControl class must implement this interface. | [IWisejSerializable](/api/wisej.core/interfaces/wisej.core.iwisejserializable) | Allows an object to serialize itself.
