Back to Devexpress

TcxCheckStatesValueFormat Subrange Type

vcl-cxcheckbox-b021ddca.md

latest3.7 KB
Original Source

TcxCheckStatesValueFormat Subrange Type

Specifies the edit value format of a check box.

Declaration

delphi
TcxCheckStatesValueFormatEx = (cvfCaptions, cvfIndices, cvfInteger, cvfStatesString, cvfCustom);
TcxCheckStatesValueFormat = cvfCaptions..cvfStatesString;

Members

NameDescription
cvfCaptionsInherited from TcxCheckStatesValueFormatEx.
cvfIndicesInherited from TcxCheckStatesValueFormatEx.
cvfIntegerInherited from TcxCheckStatesValueFormatEx.
cvfStatesStringInherited from TcxCheckStatesValueFormatEx.

Remarks

The TcxCheckStatesValueFormat class enumerates possible interpretations of the check box state into the edit value. The following options are available.

|

Value

|

Meaning

| | --- | --- | |

cvfCaptions

|

The edit value is a string containing two substrings delimited by a semicolon. The substring before the semicolon contains the list of the grayed items’ captions. The substring following the semicolon contains the list of the checked items’ captions. Note that each caption is preceded by a number indicating the caption length. The number is delimited from the corresponding caption by a colon.

5:first;5:third6:fourth

| |

cvfIndices

|

The edit value is a string containing two substrings delimited by a semicolon. The substring before the semicolon contains the comma-separated list of the grayed items’ indexes. The substring following the semicolon contains the comma-separated list of the checked items’ indexes.

0;2,3

| |

cvfInteger

|

The edit value is an integer representing the checked items’ bitwise combination. Each check item corresponds to an integer that is a power of 2. Thus, the items’ corresponding integers are 1, 2, 4, 8, 16, etc. The edit value is the sum of integers corresponding to the checked items.

12 (= 4 + 8)

Note

You cannot use the cvfInteger edit value if the editor contains more than 64 items. In this instance, an exception is raised at design and runtime.

| |

cvfStatesString

|

The edit value is a string indicating the state of all items. Each character in a string corresponds to a check item in the corresponding position. The ‘0’, ‘1’ and ‘2’ characters correspond to the unchecked, checked and grayed states respectively.

2011

|

Samples in the table above are produced for the following check controls.

TcxCheckGroupTcxCheckComboBoxTcxCheckListBox

Note

Since the TcxCheckComboBox does not support grayed items, the values which correspond to these items are equal to zero and the edit values in this case will be as follows.

ValueMeaning
cvfCaptions;5:third6:fourth
cvfIndices;2,3
cvfInteger12 (= 4 + 8)
cvfStatesString0011

Base Type

TcxCheckStatesValueFormatEx See Also

cxCheckBox Unit