AdvSpinEdit and OnChange with min/max constraints

If you are using an AdvSpinEdit with CheckMin/MaxValue properties enabled you still get OnChanged events if you manually type in text which can be validly converted but exceeds the limits. The internally used methods (Check...Value) which limit the values to the valid range (if applicable) are private and cannot be called from within the OnChanged event. The properties Value and FloatValue ignore the boundaries.

It seems that you currently need to redundently reimplement theses checks within your own code in order to obtain the value within its boundaries. It would be very much appreciated if you could provide an easier mechanism for this task, e.g. always limiting Value/FloatValue, do not call OnChanged if the value is out of bounds or at least provide a public method to limit the values.

Thanks a lot in advance and best regards,
P. Schäfer

In order not to break existing functionality other users might count on, we can expose the function AdvSpinEdit.IsInvalid: boolean so you can perform a check from the OnChange event.

This would certainly help. Thank you!

On further thought: might it additionally possible to make the Check...Value-Methods public? With this you could preview the (Float)Value with the same state the AdvSpinEdit will eventually possess. Once again thank you!

We can indeed make these public.
We've added this on the todolist.

Thanks again

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.