TcxCustomSpinEditProperties.OnGetValue Event
Enables you to customize the spin value conversion results.
Declaration
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.