[Overview][Classes][Procedures and functions][Index] Reference for unit 'Spin' (#lcl)

TCustomSpinEdit.Value

The value for the spin edit control.

Declaration

Source position: spin.pp line 161

public property TCustomSpinEdit.Value : Integer
  read GetValue
  write SetValue
  default 0;

Description

Value contains the value for the spin edit control. Its content can be modified using the UI elements for the control (up and down buttons, up and down cursor keys, edit box for the control). It can also be directly assigned in program code.

Changing the value for the property causes the Text for the control to be checked for a valid numeric representation in the property. If the new property value is the same as the existing value, no actions are performed.

When the property value has been stored, internal flags are set to ensure that Modified is updated accordingly and the private UpdateControl method in the ancestor is called. If the handle for the control has been allocated, the Change method in the ancestor is called to post a CM_CHANGED control message and signal OnChange handler(s) assigned for the control.

When changed, Value is constrained to the range defined in the MinValue and MaxValue properties (when assigned). The range limit is not enforced when MinValue and MaxValue have the same value, or when MaxValue is smaller than MinValue.

See also

TCustomSpinEdit.MinValue

  

Minimum value allowed for the spin edit control.

TCustomSpinEdit.MaxValue

  

Maximum value allowed for the spin edit control.

TCustomSpinEdit.Increment

  

The value by which the value of the control should be increased/decreased when the user clicks one of the arrows or one of the keyboard up/down arrows.

TCustomSpinEdit.GetLimitedValue

  

Gets the value for the control limited the range in MinValue and MaxValue.

TCustomEdit.Modified

  

True when the value in Text has been changed using the keyboard.


Version 4.0 Generated 2025-05-03 Home