Class

# DBKit.Label

<div class="rst-class">

forsearch

</div>

DBKit.Label

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

## Description

Displays the value of a column of the current row of the database table to which it has been assigned.

Only the members declared by <span class="title-ref">DBKit.Label</span> itself are described here; for the inherited members, see `the parent classes<dbkit.label.seealso>`.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                   | Type                               | Read-Only | Shared |
|--------------------------------------------------------|------------------------------------|-----------|--------|
| `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 |
|------------------------------------|------------|----------------------------------|--------|
| `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>` |         |

## Property descriptions

<div id="dbkit.label.columnname">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Label.ColumnName

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

> The name of the database column whose value this control displays.
>
> If blank, the control's name is used as the column name. The name may be qualified with a table name (for example "tablename.columnname") when the control shows a column from a related table.
>
> <div class="tip">
>
> <div class="title">
>
> Tip
>
> </div>
>
> Instead of setting this property, you can name the control the same as the database column. DBKit first looks at the ColumnName property; if it is blank, it then uses the name of the control itself.
>
> </div>

<div id="dbkit.label.displayname">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Label.DisplayName

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

> A user-friendly name for the control, shown to the user in place of the column name (for example in the `InvalidValueMessage<dbkit.label.invalidvaluemessage>`).
>
> If blank, the column name is de-camelcased automatically (for example "FirstName" becomes "First Name").

<div id="dbkit.label.invalidvaluemessage">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Label.InvalidValueMessage

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

> The message displayed when the control is mandatory but has no value. Use \<\$1\> as a placeholder for the control's display name.
>
> The default is "\<\$1\> must have a value."

<div id="dbkit.label.mandatory">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Label.Mandatory

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

> If `True</api/language/true>`, the control must contain a value before the row can be saved. When a row with an empty mandatory control is saved, the `InvalidValueMessage<dbkit.label.invalidvaluemessage>` is displayed and the save is cancelled.
>
> The default is `False</api/language/false>`.

<div id="dbkit.label.text">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Label.Text

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

> The text displayed by the control.

## Method descriptions

<div id="dbkit.label.tablename">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Label.TableName

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

> Returns the name of the database table for this control: the table name of the control's layout.

## Event descriptions

<div id="dbkit.label.rowchanged">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Label.RowChanged

**RowChanged**(row As `DBKit.Row</api/databases/dbkit/row>`)

> The current row (passed to the event) has been changed.

<div id="dbkit.label.rowcreated">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Label.RowCreated

**RowCreated**(row As `DBKit.Row</api/databases/dbkit/row>`)

> A new row (passed to the event) was just created and is now the current row.

<div id="dbkit.label.rowdeleted">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Label.RowDeleted

**RowDeleted**(row As `DBKit.Row</api/databases/dbkit/row>`)

> The current row (passed to the event) has been deleted.

<div id="dbkit.label.rowediting">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Label.RowEditing

**RowEditing**(row As `DBKit.Row</api/databases/dbkit/row>`)

> The current row (passed to the event) is being edited by the user.

<div id="dbkit.label.rowloaded">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Label.RowLoaded

**RowLoaded**(row As `DBKit.Row</api/databases/dbkit/row>`)

> The current row (passed to the event) has been loaded.

<div id="dbkit.label.rownotselected">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Label.RowNotSelected

**RowNotSelected**

> There is no row currently selected.

<div id="dbkit.label.rowsaved">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Label.RowSaved

**RowSaved**(row As `DBKit.Row</api/databases/dbkit/row>`)

> The current row (passed to the event) has been saved.

<div id="dbkit.label.rowsaving">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Label.RowSaving

**RowSaving**(row As `DBKit.Row</api/databases/dbkit/row>`)

> The current row (passed to this event) is about to be saved.

<div id="dbkit.label.rowundone">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Label.RowUndone

**RowUndone**(row As `DBKit.Row</api/databases/dbkit/row>`)

> The changes made to the current row (passed to this event) have been undone.

## 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.label.seealso">

<div class="seealso">

`DesktopLabel</api/user_interface/desktop/desktoplabel>` (desktop) and `WebLabel</api/user_interface/web/weblabel>` (web) parent classes; `DBKit.Row</api/databases/dbkit/row>` class.

</div>

</div>
