# UpDownBase

Namespace: **Wisej.Web**

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

* [Control](/api/wisej.web/general/control.md)
  * [UpDownBase](/api/wisej.web/editors/wisej.web.updownbase.md)

Implements the basic functionality required by a spin box (also known as an up-down control).

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

```csharp
public class UpDownBase : Control, ILabel, IReadOnly, IValidation
```

{% endtab %}

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

```visual-basic
Public Class UpDownBase
    Inherits Control
    Implements ILabel, IReadOnly, IValidation
```

{% endtab %}
{% endtabs %}

## Constructors

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

Initializes a new instance of the [UpDownBase](/api/wisej.web/editors/wisej.web.updownbase.md) class.

## Properties

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the height of the control is set automatically. (Default: `True`)

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

[BorderStyle](/api/wisej.web/enumerations/wisej.web.borderstyle.md): Returns or sets the border style for the spin box (also known as an up-down control). (Default: `Solid`)

### ![](/files/lzopMboA31bVq8UIcbT3) DefaultSize

[Size](https://docs.microsoft.com/dotnet/api/system.drawing.size): Returns the default size of the control.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the user can edit the text in the control. (Default: `True`)

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Enables or disables the browser's context menu. (Default: `True`)

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets the visibility of the spinner buttons. (Default: `False`)

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the user can use the UP ARROW and DOWN ARROW keys to select values. (Default: `True`)

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets a value that indicates that the control is invalid.

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

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the invalid message that is shown in the invalid tooltip. (Default: `""`)

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

[LabelWrapper](/api/wisej.web/editors/wisej.web.labelwrapper.md): Provides a label related to the control.

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

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the localizable label associated with this control. (Default: `""`)

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

[Size](https://docs.microsoft.com/dotnet/api/system.drawing.size): Returns or sets the maximum size of the spin box (also known as an up-down control).

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

[Size](https://docs.microsoft.com/dotnet/api/system.drawing.size): Returns or sets the minimum size of the spin box (also known as an up-down control).

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the control is read-only. (Default: `False`)

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Selects the text when gaining the focus. (Default: `False`)

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

[HorizontalAlignment](/api/wisej.web/enumerations/wisej.web.horizontalalignment.md): Returns or sets the alignment of the text in the spin box (also known as an up-down control). (Default: `Left`)

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

[HorizontalAlignment](/api/wisej.web/enumerations/wisej.web.horizontalalignment.md): Returns or sets the alignment of the up and down buttons on the spin box (also known as an up-down control). (Default: `Right`)

When this value is set to [Center](/api/wisej.web/enumerations/wisej.web.horizontalalignment.md#fields), the spin box (editable part of the control) is centered between the up and down buttons.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the collection of items continues to the first or last item if the user continues past the end of the list. (Default: `False`)

## Methods

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

Fires the [EditableChanged](#editablechanged) 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) OnReadOnlyChanged(e)

Fires the [ReadOnlyChanged](#readonlychanged) 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)

Fires the [Validating](/api/wisej.web/general/control.md#validating) event.

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

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

Processes the event from the client.

| Parameter | Type                                                        | Description      |
| --------- | ----------------------------------------------------------- | ---------------- |
| **e**     | [WisejEventArgs](/api/wisej.core/general/wisejeventargs.md) | Event arguments. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnWebRender(config)

Renders the client component.

| Parameter  | Type                                                          | Description                   |
| ---------- | ------------------------------------------------------------- | ----------------------------- |
| **config** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | Dynamic configuration object. |

### ![](/files/lzopMboA31bVq8UIcbT3) SetBoundsCore(x, y, width, height, specified)

Sets the specified bounds of the [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) control.

| Parameter     | Type                                                                        | Description                                                                                              |
| ------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| **x**         | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                 | The new [Left](/api/wisej.web/general/control.md#left) property value of the control.                    |
| **y**         | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                 | The new [Top](/api/wisej.web/general/control.md#top) property value of the control.                      |
| **width**     | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                 | The new [Width](/api/wisej.web/general/control.md#width) property value of the control.                  |
| **height**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                 | Not used.                                                                                                |
| **specified** | [BoundsSpecified](/api/wisej.web/enumerations/wisej.web.boundsspecified.md) | A combination of the [BoundsSpecified](/api/wisej.web/enumerations/wisej.web.boundsspecified.md) values. |

### ![](/files/lzopMboA31bVq8UIcbT3) UpdateEditText()

When overridden in a derived class, updates the text displayed in the spin box (also known as an up-down control).

### ![](/files/lzopMboA31bVq8UIcbT3) ValidateEditText()

When overridden in a derived class, validates the text displayed in the spin box (also known as an up-down control).

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). True if the text represents a valid value.

## Events

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

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the value of the [AutoSize](#autosize) property changes.

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

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

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

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

## Inherited By

| Name                                                                                                                                        | Description                                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DomainUpDown](/api/wisej.web/editors/domainupdown.md)                                                                                      | Represents a spinner control that displays string values.                                                                                                                                                                                |
| [NumericUpDown](/api/wisej.web/editors/wisej.web.numericupdown.md)                                                                          | Represents a spinner control that displays numeric values.                                                                                                                                                                               |
| [DataGridViewNumericUpDownEditingControl](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewnumericupdowneditingcontrol.md) | Represents a [NumericUpDown](/api/wisej.web/editors/wisej.web.numericupdown.md) control that can be hosted in a [DataGridViewNumericUpDownCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewnumericupdowncell.md). |
| [TimeUpDown](/api/wisej.web/editors/timeupdown.md)                                                                                          | Represents a spinner control that displays [TimeSpan](https://docs.microsoft.com/dotnet/api/system.timespan) values.                                                                                                                     |

## 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. |
| [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.updownbase.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.
