CheckBox.property

Description

Settings for a column whose edit style is CheckBox.

Applies to

Column controls

Syntax

DataWindow .NET dot notation:

(( CheckBox) colname.EditStyle).property [C#]
CType(colname.EditStyle, CheckBox).property [Visual Basic]

Describe and Modify argument:

"columnname.CheckBox.property { = value }"

Parameter

Description

columnname

The column whose edit style is CheckBox for which you want to get or set property values.

property

A property for the CheckBox edit style, as listed in the table below.

value

Values for the properties are shown in the table below. For CheckBox properties, value cannot be a DataWindow expression.

Property for CheckBox

Value

LeftText

Whether the CheckBox label is to the left or right of the CheckBox.

Values are:

  • Yes – Display the label on the left.

  • No – Display the label on the right.

Painter: Behavior category.

Off

A string constant specifying the column value when the CheckBox is off (unchecked). The resulting value must be the same datatype as the column.

Painter: Behavior category.

On

A string constant specifying the value that will be put in the column when the CheckBox is on (checked). The resulting value must be the same datatype as the column.

Painter: Behavior category.

Other

A string constant specifying the value that will be put in the column when the CheckBox is in the third state (neither checked nor unchecked). The value must be the same datatype as the column.

Painter: Behavior category. This option is available when ThreeStates is True.

Scale

Whether you want to scale the 2D CheckBox. Takes effect only when the ThreeD property is False.

Values are:

  • Yes – Scale the CheckBox.

  • No – Do not scale the CheckBox.

Painter: Behavior category.

Text

A string specifying the CheckBox’s label text.

Painter: Behavior category.

ThreeD

Whether the CheckBox should be 3D.

Values are:

  • Yes – Make the CheckBox 3D

  • No – Do not make the CheckBox 3D

Painter: Behavior category.

ThreeStates

Whether the CheckBox should have three states.

Values are:

  • Yes – The CheckBox has three states

  • No – The CheckBox does not have three states

Painter: Behavior category.

Usage


In the painter

Select the control and set values in the Properties window, Behavior category, when EditStyle is CheckBox.

In DataWindow .NET, you can use the CheckBox class to set CheckBox style properties using dot notation. See the description of the CheckBox class in the online Help in Visual Studio .NET for a complete list of properties. Some properties have different names in DataWindow .NET.

Examples

Example 1

[Visual Basic]
dw1.Modify("emp_gender.CheckBox.3D=no")

dw1.Modify("emp_status.CheckBox.Off='Terminated'")

dw1.Modify("emp_status.CheckBox.On='Active'")

dw1.Modify("emp_status.CheckBox.Other='Unknown'")

Example 2

[Visual Basic]
If TypeOf empBnfts.EditStyle Is CheckBox Then
   CType(empBnfts.EditStyle, CheckBox).LeftText = True
ElseIf
...

[C#]
if (empBnfts.EditStyle is CheckBox)
{
   ((Checkbox)empBnfts.EditStyle).LeftText = true;
}
else
....