Skip to main content

TcxCheckStatesValueFormat Subrange Type

Specifies the edit value format of a check box.

Declaration

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

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.

TcxCheckGroup TcxCheckComboBox TcxCheckListBox

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.

Value Meaning
cvfCaptions ;5:third6:fourth
cvfIndices ;2,3
cvfInteger 12 (= 4 + 8)
cvfStatesString 0011

Base Type

TcxCheckStatesValueFormatEx
See Also