Skip to main content

TcxCustomSpinEditProperties.ValueType Property

Specifies the type of the spin value.

Declaration

property ValueType: TcxSpinEditValueType read; write;

Property Value

Type
TcxSpinEditValueType

Remarks

The ValueType property determines the type of value which a spin editor displays. Two types are valid: integer and double. Setting the ValueType property to one of these types automatically changes the type of the variant Value property and visualizes the value accordingly.

The ValueType affects the incrementing procedure when a user clicks the spin buttons or presses the Up Arrow, Down Arrow, Page Up, or Page Down key (or the Ctrl+Up Arrow, Ctrl+Down Arrow, Ctrl+Page Up, or Ctrl+Page Down key combination if the UseCtrlIncrement property is set to True). The spin value is incremented/decremented by the amount specified by the Increment or LargeIncrement property. If the ValueType property is set to vtInt, then the increment value is rounded to the nearest integer number first and then added to/subtracted from Value.

If you do not set the ValueType property then the default type is used. For non data-aware spin editors (TcxSpinEdit controls), the default type is vtInt. For data-aware spin editors (TcxDBSpinEdit controls), the default value type is determined based upon the associated field from the dataset.

To restore ValueType and other properties to their default values, use the RestoreDefaults method.

See Also