Vcl.DBCtrls.TDBCheckBox.ValueUnchecked

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property ValueUnchecked: string read FValueUncheck write SetValueUncheck stored IsValueUnchecked nodefault;

C++

__property System::UnicodeString ValueUnchecked = {read=FValueUncheck, write=SetValueUncheck, stored=IsValueUnchecked};

Properties

Type Visibility Source Unit Parent
property published
Vcl.DBCtrls.pas
Vcl.DBCtrls.hpp
Vcl.DBCtrls TDBCheckBox

Description

Specifies the field value that corresponds to the unchecked state of the check box.

Use ValueUnchecked to specify the field value represented by the check box when it is unchecked. If the value of the ValueUnchecked property is equal to the data in the field of the current record of the dataset, the database check box appears unchecked. When the user unchecks the database check box, the field value is set to ValueUnchecked.

ValueUnchecked can represent more than one value in a semicolon-delimited list of items. If any of the items matches the contents of the field of the current record in the dataset, the check box appears unchecked. For example, set the value of ValueUnchecked string like this:



DBCheckBox1.ValueUnchecked := 'False;No;Off';



DBCheckBox1->ValueUnchecked = "False;No;Off";



If the contents of the associated field is the string false, No, or Off, the check box appears unchecked. The value of the field is compared to ValueUnchecked in a case-insensitive comparison. If the user unchecks a check box where ValueUnchecked 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 ValueChecked property, the check box appears checked. 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 unchecked if the contents of the field is false, and it is always checked if the contents of the field is true. The values of the ValueChecked and ValueUnchecked properties have no affect on logical fields.

See Also