SetMinMax Method

Measurement Studio User Interface

SetMinMax Method

Syntax

CWNumEdit.SetMinMax Minimum, Maximum

Purpose

Sets the Minimum and Maximum properties.

Remarks

Use the Minimum and Maximum properties to implement range checking on the value of the CWNumEdit control. If the RangeChecking property is set to True, the CWNumEdit control prevents the user from entering a value outside the range specified by the minimum and maximum values. When RangeChecking is set to False, the ValueChanging and ValueChanged events both pass back the OutOfRange parameter, which returns True if the new value of the control is out of range.

Parameters

Minimum As Variant

The minimum range checking value.

Maximum As Variant

The maximum range checking value.

Example

'Set the min to 0 and the max to 100
CWNumEdit1.SetMinMax 0, 100

See Also

RangeChecking

Minimum

Maximum

ValueChanging

ValueChanged