Class

DBKit.Label

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 DBKit.Label itself are described here; for the inherited members, see the parent classes.

Properties

Name

Type

Read-Only

ColumnName

String

DisplayName

String

InvalidValueMessage

String

Mandatory

Boolean

Text

String

Methods

Name

Parameters

Returns

TableName

String

Events

Name

Parameters

Returns

RowChanged

row As DBKit.Row

RowCreated

row As DBKit.Row

RowDeleted

row As DBKit.Row

RowEditing

row As DBKit.Row

RowLoaded

row As DBKit.Row

RowNotSelected

RowSaved

row As DBKit.Row

RowSaving

row As DBKit.Row

RowUndone

row As DBKit.Row

Property descriptions


DBKit.Label.ColumnName

ColumnName As 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.

Tip

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.


DBKit.Label.DisplayName

DisplayName As String

A user-friendly name for the control, shown to the user in place of the column name (for example in the InvalidValueMessage).

If blank, the column name is de-camelcased automatically (for example "FirstName" becomes "First Name").


DBKit.Label.InvalidValueMessage

InvalidValueMessage As 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."


DBKit.Label.Mandatory

Mandatory As Boolean

If 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 is displayed and the save is cancelled.

The default is False.


DBKit.Label.Text

Text As String

The text displayed by the control.

Method descriptions


DBKit.Label.TableName

TableName() As String

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

Event descriptions


DBKit.Label.RowChanged

RowChanged(row As DBKit.Row)

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


DBKit.Label.RowCreated

RowCreated(row As DBKit.Row)

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


DBKit.Label.RowDeleted

RowDeleted(row As DBKit.Row)

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


DBKit.Label.RowEditing

RowEditing(row As DBKit.Row)

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


DBKit.Label.RowLoaded

RowLoaded(row As DBKit.Row)

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


DBKit.Label.RowNotSelected

RowNotSelected

There is no row currently selected.


DBKit.Label.RowSaved

RowSaved(row As DBKit.Row)

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


DBKit.Label.RowSaving

RowSaving(row As DBKit.Row)

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


DBKit.Label.RowUndone

RowUndone(row As 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) 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

See also

DesktopLabel (desktop) and WebLabel (web) parent classes; DBKit.Row class.