The numerical limits of a spin button.

Usage

Set_Property(OLECtrlEntID, "OLE.SpinRange[CtrlId]", Values)

Values

Dynamic array structure describing a few properties of the spin button:

PositionNameDescriptionDefault
<1>
Lower LimitThe smallest number the spin button can generate.
-2147483648
<2>
Upper LimitThe largest number the spin button
 2147483647
<3>
Wrapping EnabledDoes exceeding the limit wrap to the other limit?
          0

Remarks

The SpinRange property lets you set some behaviors to the spin button. By default, the spin button's limits are that of a signed 32-bit number, but you can change the limits to anything you need. The third field defines what happens when the user attempts to exceed on of the range limits. If set to 0, then any attempt to exceed the limit does nothing. If set to 1, the exceeding a limit simply wraps around to the opposite limit. For example, if the range is -10 to 10, then clicking the down button when the value is already -10, will cause the value to become 10.

Example

// Set the range to be 0 to 100, and allow wrapping, for a control whose name is EDL_PERCENTAGE
SpinRange = ""
SpinRange<1> = 0
SpinRange<2> = 100
SpinRange<3> = 1
Set_Property(@Window:".OLE_SUBCLASS", "OLE.SpinRange[EDL_PERCENTAGE]", SpinRange)

See Also

SpinButton

  • No labels