The GradientChange event is assigned to edtSteps which is created before the CheckBox (by reading the form from the
dfm file). Reading the value and setting it to the spin edit then triggers the event.
There are several ways to fix this:
If you have
access to the code of the spinedit:
- define the events after all other properties so they are assigned after the value is set (because of the order they are written to the
dfm then)
If you don't have
access to the code:
- add a condition to your GradientChange event that prevents it from being triggered during form creation