# TypedTextBox

Namespace: **Wisej.Web**

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

* [Control](/api/wisej.web/general/control.md)
  * [TextBoxBase](/api/wisej.web/editors/wisej.web.textboxbase.md)
    * [TextBox](/api/wisej.web/editors/wisej.web.textbox.md)
      * [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox.md)

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

{% tabs %}
{% tab title="C#" %}

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

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class TypedTextBox
    Inherits TextBox
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/hsR4ok3152WyAf8J2C1u) TypedTextBox()

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

### ![](/files/hsR4ok3152WyAf8J2C1u) TypedTextBox(onTextChanged)

Initializes a new instance of the [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox.md) 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.md#textchanged) event. |

### ![](/files/hsR4ok3152WyAf8J2C1u) TypedTextBox(label, onTextChanged)

Initializes a new instance of the [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox.md) 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.md) label. |
| **onTextChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | Handler for the [TextChanged](/api/wisej.web/general/control.md#textchanged) event.                        |

### ![](/files/hsR4ok3152WyAf8J2C1u) TypedTextBox(location, size, onTextChanged)

Initializes a new instance of the [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox.md) 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.md) 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.md).                           |
| **onTextChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | Handler for the [TextChanged](/api/wisej.web/general/control.md#textchanged) event.                         |

### ![](/files/hsR4ok3152WyAf8J2C1u) TypedTextBox(label, location, size, onTextChanged)

Initializes a new instance of the [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox.md) 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.md) label.  |
| **location**      | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point)                 | The location of the [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox.md) 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.md).                           |
| **onTextChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | Handler for the [TextChanged](/api/wisej.web/general/control.md#textchanged) event.                         |

## Properties

### ![](/files/hsR4ok3152WyAf8J2C1u) Culture

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

### ![](/files/hsR4ok3152WyAf8J2C1u) 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`)

### ![](/files/hsR4ok3152WyAf8J2C1u) 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`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Text

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

### ![](/files/hsR4ok3152WyAf8J2C1u) Value

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

### ![](/files/hsR4ok3152WyAf8J2C1u) 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.md). (Default: `System.String`)

## Methods

### ![](/files/lzopMboA31bVq8UIcbT3) OnCultureChanged(e)

Fires the [CultureChanged](#culturechanged) event.

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

### ![](/files/lzopMboA31bVq8UIcbT3) OnCustomFormatChanged(e)

Fires the [CustomFormatChanged](#customformatchanged) event.

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

### ![](/files/lzopMboA31bVq8UIcbT3) OnEnter(e)

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

### ![](/files/lzopMboA31bVq8UIcbT3) OnFormat(e)

Fires the [Format](#format) event.

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

### ![](/files/lzopMboA31bVq8UIcbT3) OnParse(e)

Fires the [Parse](#parse) event.

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

### ![](/files/lzopMboA31bVq8UIcbT3) OnTextChanged(e)

Fires the [TextChanged](/api/wisej.web/general/control.md#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. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnValidating(e)

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

### ![](/files/lzopMboA31bVq8UIcbT3) OnValueChanged(e)

Fires the [ValueChanged](#valuechanged) event.

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

### ![](/files/lzopMboA31bVq8UIcbT3) OnValueTypeChanged(e)

Fires the [ValueTypeChanged](#valuetypechanged) event.

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

## Events

### ![](/files/hsR4ok3152WyAf8J2C1u) CultureChanged

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

### ![](/files/hsR4ok3152WyAf8J2C1u) CustomFormatChanged

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

### ![](/files/hsR4ok3152WyAf8J2C1u) Format

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

### ![](/files/hsR4ok3152WyAf8J2C1u) Parse

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

### ![](/files/hsR4ok3152WyAf8J2C1u) ValueChanged

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

### ![](/files/hsR4ok3152WyAf8J2C1u) ValueTypeChanged

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

## Implements

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
