srvdbcheckbox TSRVDBCheckBox

<< Click to display table of contents >>

srvdbcheckbox TSRVDBCheckBox

TSRVDBCheckBox is a data-aware control that allows the user to select or deselect a single value.

Unit SRVDBCheckBox;

Syntax

TSRVDBCheckBox = class(TSRVCheckbox)

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TSRVCustomControl

TSRVCheckbox

Description

Use TSRVDBCheckBox to insert a data-aware check box in an editor. A check box presents an option to the user; the user can check it to select the option or uncheck it to deselect the option. A database check box (TSRVDBCheckBox) is much like an ordinary check box (TSRVCheckBox), except that it is aware of the data in a particular field of a dataset. Because check boxes can represent only two values (checked and unchecked), database check boxes are most appropriate for boolean fields. They can, however, be used to group the values of any field into two sets.

For applications that don't require the data-aware capabilities of TSRVDBCheckBox, use TSRVCheckBox instead to conserve system resources.

Properties and events

New properties:

Property

Type

Default value

Meaning

published DataField

String

'' (empty string)

Identifies the field from which the control displays data.

published DataSource

TDataSource

nil

Links the control to a dataset.

none Field

TField

 

Returns the TField object whose current value the control represents.

published ReadOnly

Boolean

False

Determines whether the user can change the value of the field.

published  ValueChecked

String

'True'

Specifies the field value that corresponds to the checked state of the check box. ValueChecked can represent more than one value in a semicolon-delimited list.

published  ValueUnchecked

String

'False'

Specifies the field value that corresponds to the unchecked state of the check box. ValueUnchecked can represent more than one value in a semicolon-delimited list.