TDBCheckBox
Description
Allows the user to select or deselect a single value.
Remarks
Use TDBCheckBox to place a data-aware check box on a form. A check box presents an option to the user. The user can check it to select the option or clear it to deselect the option. A database check box (TDBCheckBox) is much like an ordinary check box (TCheckBox), 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 TDBCheckBox, use TCheckBox instead.
TDBCheckBox Properties
Property ValueChecked: String (R/W)
Specifies the field value that corresponds to the checked state of the checkbox. Use ValueChecked to specify the field value represented by the check box when it is checked. If the value of the ValueChecked property is equal to the data in the field of the current record of the dataset, the database check box appears checked. When the user checks the database check box, the field value is set to ValueChecked.
Property ValueUnChecked: String (R/W)
If the contents of the associated field is the string true, Yes, or On, the check box is checked. The value of the field is compared to ValueChecked in a case-insensitive comparison. If the user selects a check box where ValueChecked represents more than one value, the first item in the list is assigned to the field. If the contents of the field of the current record matches a string specified as the value of the ValueUnchecked property, the check box appears unchecked. If the contents of the field matches no string in either ValueChecked or ValueUnchecked, the check box appears gray.
Note: If the DataField of the database check box is a logical field, the check box is always checked if the contents of the field is true, and it is always unchecked if the contents of the field is false. The values of the ValueChecked and ValueUnchecked properties have no affect on logical fields.
General Data-Aware Control Properties
Property DataField: String (R/W)
Property DataSource: TDataSource (R/W)
Property ReadOnly: Boolean (R/W)