Well... you actually can link one TEdit
to another TEdit
(or, for that matter, any other component/control/property to any other component/control/property), but you will need to use LiveBinding, or kbmMW SmartBinding.
In kbmMW SmartBinding, you can do it in a couple of ways. In code:
Binding.Bind(Edit1,'Text',Edit2,'Text');
One way binding. If you change Edit1.Text
somehow (by typing or by code), Edit2.Text
will automatically be updated. But, if you change Edit2.Text
, Edit1.Text
will not change.
Binding.Bind(Edit1,'Text',Edit2,'Text',[mwboTwoWay]);
Two way binding. If you change either Edit1
or Edit2
's Text
property, the other will also be changed.
Or, you can do it at design-time by setting the Edit1.Text
property to:
{Edit2.Text, twoWay:true}
And then call Binding.AutoBind(Self)
in the Form's OnCreate
event handler.
kbmMW SmartBinding is included in kbmMW Community Edition for Delphi 10.4 Sydney, which is freely available for download at https://portal.components4developers.com