To add two string properties (of two components) to another component's property in XE5, assuming that the first two components are TLabeledEdit1, and TLabeledEdit2 respectively,

  1. Drop a TBindScope component on the form
  2. Drop a TBindingsList component on the form
  3. Right click on TBindingsList, and select BindingComponents
  4. Right click on (All LiveBindings) and select New BindingExpression.
  5. In the new TBindingExpression component, set the following properties
    • ControlComponent: set to the destination component
    • ControlExpression: set to the name of the property to update
    • Direction: dirSourceToControl
    • SourceComponent: set to BindScope created in step 1.
    • SourceExpression: set to the expression LabeledEdit1.Text + LabeledEdit2.Text
  6. Create a common OnChange event for the two TLabelEdit and in the two LabelEdit's OnChange event, use the following code:
    1. TBindings.Notify(Sender, 'Text');
  7. Add System.Bindings.Helper to the uses clause

It's all a lot of work. Alternatively, instead of all the above work, in the two TLabelEdit's OnChange event, one can just do

  • DestinationComponent.Text := LabeledEdit1.Text + LabeledEdit2.Text;