If a column can take only one of two (or perhaps three) values, you might want to display the column as a check box; users can select or clear the check box to specify a value. In the following entry from a DataWindow object, users can simply check or clear a box to indicate whether an employee has health insurance:
To use the CheckBox edit style:
Select CheckBox from the EditStyle list and specify properties for that style.
In the Text box, enter the text you want displayed next to the check box.
In the CheckBox On and Off fields, enter the values you want put in the DataWindow buffer when the CheckBox is checked (on) or unchecked (off).
If you set 3 States to True, an optional third state box (other) appears, for the case when the condition is neither on nor off.
The value you enter in the Text box becomes the display value, and values entered for On, Off, and Other become the data values.
When users check or clear the check box at runtime, DataWindow .NET enters the appropriate data value in its buffer. When the UpdateData method is called, DataWindow .NET sends the corresponding data values to the database.
You may find it useful to center check boxes used for columns of information. First make the text control used for the column header and the column control the same size and left aligned. Then you can center the check boxes and the column header. Set LeftText to False and clear the Text field, then specify Alignment>Center in the General category.