I have a FireMonkey FMX TForm
in Delphi 10.2 with many TSpinBoxes
. For each TSpinBox
I add a corresponding property to the TForm
.
I want to link each TSpinBox
to the corresponding TForm
property so that changing the value of a TSpinBox
automatically updates the corresponding TForm
property and vice versa.
In the past I did this by using an OnChange
event handler for each TSpinBox
to update the corresponding TForm
property and the property's setter method to update the TSpinBox
value.
Because I have many TSpinBoxes
this is now becoming very cumbersome. Is there a better, more efficient way to do this?
Sender
to determine which component fired the event). Or perhaps how indexed properties work. It might allow you to have a single property for updating state of any of your SpinBoxes. Without seeing pat of your existing code all we can do is just guess. And her on SO such questions are not wanted.