AdvSpinEdit and CheckMinValue

Just discovered that CheckMinValue and CheckMaxValue have become false by default, so an AddvSpinEdit goes to pretty well any value a user sets even one which the code doesn't expect. Can you briefly explain which problem you were solving in that? (I.e. whether I am likely to have a problem setting them to true? I have a large set of applications with numerous AdvSpinEdits and have mostly set min and max values which need to be enforced...)


Cheers -- Mike

The issue is with users who do not want min/max checking.
Before it would perform min/max checking automatically and always when AdvSpinEdit.MinValue was different from AdvSpinEdit.MaxValue and when both were set to the same value, it would not perform a check. Some users complained with was not good as it wouldn't do a needed validation when there was only one value acceptable. So, that's why we introduced CheckMinValue/CheckMaxValue as this only now determines whether AdvSpinEdit.MinValue / AdvSpinEdit.MaxValue are used for range checking.

I understand, I think. 


But if a programmer set a minvalue and maxvalue of 7 (for example), could you not simply have checked with 
... 
  if NewValue < MinValue then NewValue := MinValue;
// note no ELSE in here
  if NewValue > MaxValue then NewValue := MaxValue;
... 

Anyway I have re-defined fCheckMinValue and fCheckMaxValue as true in the Create constructor.

Thanks -- Mike

The different scenarios some users want/expect are often more complex than this.