The function in the expression is limited. For example, if I want to bind the length of the output text (for example, the length of the output edit1.text in label1), there is no corresponding function;
This can be handled in the onassigningvalue event of tbindexpression.
Tbindexpression and its brothers (tbindexpritems, tbindlink, tbindlistlink, marker, tbindposition, tbindlist, marker, tbinddbeditlink, marker, Token, tbinddbchecklink, and timeout) have the same events.
Add label1, edit1, and bindingslist1 to the form, and then activate the onkeyup event of edit1 and the default event of the form;
Code You have manually completed the onassingningvalue event. It is more convenient to add the event during design.
Unit unit1; interfaceuses system. sysutils, system. types, system. uitypes, system. classes, system. variants, FMX. types, FMX. controls, FMX. forms, FMX. dialogs, Data. BIND. engext, FMX. BIND. dbengext, system. rtti, system. bindings. outputs, FMX. layouts, Data. BIND. components, FMX. edit; Type tform1 = Class (tform) label1: tlabel; edit1: tedit; bindingslist1: dependencies; Procedure formcreate (Sender: tobject); Procedure edit1keyup (Sender: tobject; var key: word; var keychar: Char; shift: tshiftstate); Procedure myonassigningvalue (Sender: tobject; assignvaluerec: handle; VaR value: tvalue; var handled: Boolean); end; var form1: tform1; implementation {$ R *. FMX} procedure tform1.formcreate (Sender: tobject); begin with tbindexpression. create (bindingslist1) Do begin controlcomponent: = label1; controlexpression: = 'text'; sourcecomponent: = edit1; sourceexpression: = 'text'; onassigningvalue: = myonassigningvalue; // active: = true; end; Procedure tform1.edit1keyup (Sender: tobject; var key: word; var keychar: Char; shift: tshiftstate); begin bindingslist1.notify (sender, ''); end; procedure tform1.myonassigningvalue (Sender: tobject; assignvaluerec: tbindingassignvaluerec; VaR value: tvalue; var handled: Boolean); begin value: = length (value. tostring); // end; end.