Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomSpinEditProperties.OnGetValue Event

In This Article

Enables you to customize the spin value conversion results.

#Declaration

Delphi
property OnGetValue: TcxSpinEditGetValueEvent read; write;

#Remarks

This event fires when the spin editor cannot convert the display value (Value) to the edit value (EditValue) of the numeric type specified via the ValueType property.

The value conversion occurs when one of the following takes place:

  • Focus is moved from the spin editor to another control.

  • The Enter key is pressed, providing that the ValidateOnEnter property is set to True.

The Sender parameter specifies the spin editor that fired the event.

The display value is passed as the AText parameter.

The Error parameter is initialized to True to indicate that a plain conversion of the AText to the edit value of the numeric type failed. If your conversion succeeds, pass False as the Error parameter to clear the error flag and pass the resulting edit value as the AValue parameter.

The ErrorText parameter contains an error description. This parameter is initialized with an empty string. If your conversion fails, assign an error description to the ErrorText. If the ExceptionOnInvalidInput property is set to True, an exception is raised to display this error description.

See Also