Now, you can test your FormatFloat method. Just drop a TBindingsList component onto a form and open the editor for the Methods property to check whether your method is listed.
Just drop a BindSource (TBindSourceDB or TPrototypeBindSource) so that you have some data (with a floating-point value, of course) and try to use the FormatFloat function in a LiveBindings expression (beware that most parts of the LiveBindings expression engine are case-sensitive, even if this may sound unusual to a Pascal developer).
The following screenshot shows an example of how to use our newly introduced method:
In the preceding screenshot, you can see that I've added three expressions to bind the value of FloatField1 (a data generator within my PrototypeBindSource1) to three different text items in our TListView, each with a different CustomFormat property value making use of the FormatFloat function:
- The first (for Text1) simply determines...