Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
DelphiIDENews

From Bindings List to Visual LiveBindings

Having looked into Delphi’s expression engine, component bindings, and the bindings list component, we can now look at the easy and intuitive way to configure an application with dynamic bindings, the Visual LiveBindings design surface.


Over the past few weeks, I blogged about Delphi’s expression engine, binding expressions and component, and the bindings list component. Now it is time to put it all together by looking at the visual tools Delphi makes available to easily configure bindings. This is called LiveBindings Designer (available under the View | Tool Windows menu) and it’s an additional pane you can display alongside a design time form or data module.

Here is how the demo from the last blog post looks in the LiveBindings Designer:

livebinginds_01-6805877

Now if you want to create some of the bindings directly in the designer, you can do the following sample steps:

  • Open a new form
  • Drop a NumberBox controls and a Progressbar controls
  • In the LiveBindings designer drag from the Value property of the NumberBox to the Progress property of the Progressbar, like below:livebinginds_02-3769999

Now, enable the inline arrows to change the value and it will work with no code. Alternatively, if you type in the NumberBox, the value gets refreshed when you leave the control (so you need at least another control that can receive the input focus.

Now this is a very simple scenario, there are many properties of controls you can connect, but you might need to expand the “bindable” properties from the default ones, by selecting the three dots at the bottom of the elements in the LiveBindings designer.

livebinginds_03-8379288

Now it is important to notice that this designer and the related wizards are primarily focused on database data binding scenarios, which is why associating UI controls doesn’t always work easily. We’ll look into data bindings in a future blog post.

rad studio banner blog

See What's New in 12.2 Athens See What's New in 12.2 Athens Dev Days of Summer 2-24

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

About author

Marco is one of the RAD Studio Product Managers, focused on Delphi. He's the best selling author of over 20 books on Delphi.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES