Class

# DBKit.NumberLabel

<div class="rst-class">

forsearch

</div>

DBKit.NumberLabel

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Can display the column value of the current row of the database table to which it has been assigned.

It displays numeric values.

The value is formatted according to the control's `Type<dbkit.numberlabel.type>`, `ThousandsSeparator<dbkit.numberlabel.thousandsseparator>` and `DecimalPlaces<dbkit.numberlabel.decimalplaces>`.

Only the members declared by <span class="title-ref">DBKit.NumberLabel</span> itself are described here. The members it inherits from <span class="title-ref">DBKit.Label</span> are also listed below and are documented on the `DBKit.Label</api/databases/dbkit/label>` page.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                       | Type                                         | Read-Only | Shared |
|------------------------------------------------------------|----------------------------------------------|-----------|--------|
| `DecimalPlaces<dbkit.numberlabel.decimalplaces>`           | `Integer</api/data_types/integer>`           |           |        |
| `DefaultValue<dbkit.numberlabel.defaultvalue>`             | `Double</api/data_types/double>`             |           |        |
| `Format<dbkit.numberlabel.format>`                         | `String</api/data_types/string>`             |           |        |
| `Number<dbkit.numberlabel.number>`                         | `Double</api/data_types/double>`             |           |        |
| `ThousandsSeparator<dbkit.numberlabel.thousandsseparator>` | `Boolean</api/data_types/boolean>`           |           |        |
| `Type<dbkit.numberlabel.type>`                             | `NumberTypes<dbkit.numberlabel.numbertypes>` |           |        |
| `ColumnName<dbkit.label.columnname>`                       | `String</api/data_types/string>`             |           |        |
| `DisplayName<dbkit.label.displayname>`                     | `String</api/data_types/string>`             |           |        |
| `InvalidValueMessage<dbkit.label.invalidvaluemessage>`     | `String</api/data_types/string>`             |           |        |
| `Mandatory<dbkit.label.mandatory>`                         | `Boolean</api/data_types/boolean>`           |           |        |
| `Text<dbkit.label.text>`                                   | `String</api/data_types/string>`             |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                     | Parameters | Returns                          | Shared |
|----------------------------------------------------------|------------|----------------------------------|--------|
| `NumericTypeFormat<dbkit.numberlabel.numerictypeformat>` |            | `String</api/data_types/string>` |        |
| `TableName<dbkit.label.tablename>`                       |            | `String</api/data_types/string>` |        |

## Events

<div class="rst-class">

table-centered_column_4

</div>

| Name                                         | Parameters                                   | Returns |
|----------------------------------------------|----------------------------------------------|---------|
| `RowChanged<dbkit.label.rowchanged>`         | row As `DBKit.Row</api/databases/dbkit/row>` |         |
| `RowCreated<dbkit.label.rowcreated>`         | row As `DBKit.Row</api/databases/dbkit/row>` |         |
| `RowDeleted<dbkit.label.rowdeleted>`         | row As `DBKit.Row</api/databases/dbkit/row>` |         |
| `RowEditing<dbkit.label.rowediting>`         | row As `DBKit.Row</api/databases/dbkit/row>` |         |
| `RowLoaded<dbkit.label.rowloaded>`           | row As `DBKit.Row</api/databases/dbkit/row>` |         |
| `RowNotSelected<dbkit.label.rownotselected>` |                                              |         |
| `RowSaved<dbkit.label.rowsaved>`             | row As `DBKit.Row</api/databases/dbkit/row>` |         |
| `RowSaving<dbkit.label.rowsaving>`           | row As `DBKit.Row</api/databases/dbkit/row>` |         |
| `RowUndone<dbkit.label.rowundone>`           | row As `DBKit.Row</api/databases/dbkit/row>` |         |

## Enumerations

<div id="dbkit.numberlabel.numbertypes">

<div class="rst-class">

forsearch

</div>

</div>

DBKit.NumberLabel.NumberTypes

### NumberTypes

> The type of number displayed by the control.
>
> | Types      |
> |------------|
> | Number     |
> | Currency   |
> | Percentage |
> | Custom     |
>
> Number displays the value as a plain number. Currency displays the value as currency. Percentage displays the value as a percentage. Custom displays the value using a custom format.

## Property descriptions

<div id="dbkit.numberlabel.decimalplaces">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NumberLabel.DecimalPlaces

**DecimalPlaces** As `Integer</api/data_types/integer>`

> The number of decimal places displayed for the value.

<div id="dbkit.numberlabel.defaultvalue">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NumberLabel.DefaultValue

**DefaultValue** As `Double</api/data_types/double>`

> The default value of the field.

<div id="dbkit.numberlabel.format">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NumberLabel.Format

**Format** As `String</api/data_types/string>`

> A custom format string used to display the value when `Type<dbkit.numberlabel.type>` is set to Custom.

<div id="dbkit.numberlabel.number">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NumberLabel.Number

**Number** As `Double</api/data_types/double>`

> The numeric value displayed by the control. Assign a value to display it formatted according to the control's `Type<dbkit.numberlabel.type>`, `ThousandsSeparator<dbkit.numberlabel.thousandsseparator>` and `DecimalPlaces<dbkit.numberlabel.decimalplaces>`.

<div id="dbkit.numberlabel.thousandsseparator">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NumberLabel.ThousandsSeparator

**ThousandsSeparator** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the value is displayed with thousands separators.

<div id="dbkit.numberlabel.type">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NumberLabel.Type

**Type** As `NumberTypes<dbkit.numberlabel.numbertypes>`

> The type of number displayed by the control.

## Method descriptions

<div id="dbkit.numberlabel.numerictypeformat">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NumberLabel.NumericTypeFormat

**NumericTypeFormat**() As `String</api/data_types/string>`

> The format string used to display the value, derived from `Type<dbkit.numberlabel.type>`, `ThousandsSeparator<dbkit.numberlabel.thousandsseparator>` and `DecimalPlaces<dbkit.numberlabel.decimalplaces>`.

## Notes

#### Localization

Localize the control's user-facing text (`InvalidValueMessage<dbkit.label.invalidvaluemessage>`) the standard Xojo way: assign a dynamic constant to each property and provide translations for as many languages as you need, or localize the property values directly.

## Compatibility

|                       |              |
|-----------------------|--------------|
| **Project Types**     | Desktop, Web |
| **Operating Systems** | All          |

<div id="dbkit.numberlabel.seealso">

<div class="seealso">

`DBKit.Label</api/databases/dbkit/label>` parent class; `DBKit.Row</api/databases/dbkit/row>` class.

</div>

</div>
