Einzelnen Beitrag anzeigen

Benutzerbild von Stevie
Stevie

Registriert seit: 12. Aug 2003
Ort: Soest
4.027 Beiträge
 
Delphi 10.1 Berlin Enterprise
 
#18

AW: My Delphi 2010 is sick

  Alt 9. Jul 2012, 01:35
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
Stefan
“Simplicity, carried to the extreme, becomes elegance.” Jon Franklin

Delphi Sorcery - DSharp - Spring4D - TestInsight
  Mit Zitat antworten Zitat