Class
DBKit.CheckBox
DBKit.CheckBox
Description
Displays and edits the value of a single database column for the current row as a checkbox.
The box is checked when the column value is true and unchecked when it is false. Changing the checkbox writes 1 (checked) or 0 (unchecked) back to the row automatically.
Only the members declared by DBKit.CheckBox itself are described here; for the inherited members, see the parent classes.
Properties
Name |
Type |
Read-Only |
|---|---|---|
Methods
Name |
Parameters |
Returns |
|---|---|---|
Events
Name |
Parameters |
Returns |
|---|---|---|
row As DBKit.Row |
||
row As DBKit.Row |
||
row As DBKit.Row |
||
row As DBKit.Row |
||
row As DBKit.Row |
||
row As DBKit.Row |
||
row As DBKit.Row |
||
row As DBKit.Row |
Property descriptions
DBKit.CheckBox.ColumnName
ColumnName As String
The name of the database column whose value this control displays and edits.
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.CheckBox.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.CheckBox.InvalidValueMessage
InvalidValueMessage As String
The message displayed when the field is mandatory but is not checked. Use <$1> as a placeholder for the control's display name.
The default is "<$1> must be checked."
DBKit.CheckBox.Mandatory
Mandatory As Boolean
If True, the checkbox must be checked before the row can be saved. When a row with an unchecked mandatory checkbox is saved, the InvalidValueMessage is displayed and the save is cancelled.
The default is False.
Method descriptions
DBKit.CheckBox.TableName
TableName() As String
Returns the name of the database table the control's column belongs to, resolved from the control's layout.
Event descriptions
DBKit.CheckBox.RowChanged
RowChanged(row As DBKit.Row)
The current row (passed to the event) has been changed.
DBKit.CheckBox.RowCreated
RowCreated(row As DBKit.Row)
A new row (passed to the event) was just created and is now the current row.
DBKit.CheckBox.RowDeleted
RowDeleted(row As DBKit.Row)
The current row (passed to the event) has been deleted.
DBKit.CheckBox.RowEditing
RowEditing(row As DBKit.Row)
The current row (passed to the event) is being edited by the user.
DBKit.CheckBox.RowLoaded
RowLoaded(row As DBKit.Row)
The current row (passed to the event) has been loaded.
DBKit.CheckBox.RowNotSelected
RowNotSelected
There is no row currently selected.
DBKit.CheckBox.RowSaved
RowSaved(row As DBKit.Row)
The current row (passed to the event) has been saved.
DBKit.CheckBox.RowSaving
RowSaving(row As DBKit.Row)
The current row (passed to this event) is about to be saved.
DBKit.CheckBox.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
DesktopCheckBox (desktop) and WebCheckBox (web) parent classes; DBKit.Row class.