Discrete Property

Measurement Studio User Interface

Discrete Property

Syntax

CWNumEdit.Discrete

Data Type

Boolean

Purpose

Specifies if the CWNumEdit control is in discrete or continuous mode.

Remarks

When the CWNumEdit control is in discrete mode, the valid values are limited. The value of the control is always assigned to the closest discrete value. For example, you can set the CWNumEdit control to allow only integers, where the valid values are -1, 0, 1, 2 , 3, and so on, by using a discrete axis.

Example

'Setup the CWNumEdit control to take only integer data.
CWNumEdit1.Discrete = True
CWNumEdit1.DiscreteInterval = 1
CWNumEdit1.DiscreteBase = 1

'Setup the CWNumEdit control to round all data to the nearest .5
CWNumEdit1.Discrete = True
CWNumEdit1.DiscreteInterval = .5
CWNumEdit1.DiscreteBase = 0

See Also

DiscreteBase

DiscreteInterval