XE3 Visual LiveBindings: Hiding and showing components

Posted by on in Blogs
This post describes how to specify which components show on the LiveBindings designer.

Hide/Show Component Classes

To reduce clutter, the LiveBindings designer hides many classes of components. The default settings show most visual control classes and hide most non-visual components classes except for data sources.

The settings are in Tools/Options/LiveBindings:

If there is a component class that you always want to see on the LiveBindings designer, add it to the "Included Items:" field. For example, if you use FireMonkey 3D controls then you'll probably want to add "TControl3D".

This setting will cause components derived from TControl3D, like TText3D, to show in the LiveBindings designer.

Hide/Show Component instances

To hide a specific component, right click on the component in the LiveBindings designer and choose "Hide Elements(s)".

To show a hidden component, use the object inspector to change the LiveBindings Designer properties for the component.

LiveBindings Designer properties for a components supersede the settings for the component's class in Tools/Options. LiveBindings Designer properties for components are saved in unitname.vlb file with other LiveBindings designer state information.

Link to TForm

The LiveBindings designer can be configured to show the TCustomForm class, but the form instance will not show in the designer until the form is linked.

To configure the LiveBindings designer to show TCustomForm, prepend the "Included Items:" setting with "TCustomForm;".

A link can be created to a TLabel and then modified using the object inspector.

  1. New FireMonkey application

  2. Drop a TEdit and TLabel on the form

  3. In the LiveBindings designer, link TEdit.Text to TLabel.Text

  4. Select the link component by clicking on the line between the components

  5. In the object inspector, change the "ComponentProperty" property to blank

  6. Change the "Component" property to "Form1"

  7. Change the "ComponentProperty" property to "Caption"

  8. Delete the TLabel component


  • Guest
    C Johnson Wednesday, 3 October 2012

    Too bad the layers & hide feature seem useless - they aren't streamed with the form, so anything you do with them vanish all the time. The designer seems half baked, and that worries me about the whole visual bindings feature.

  • Guest
    Jim Tierney Wednesday, 3 October 2012

    Properties are streamed to a .vlb file rather than to the .dfm or .fmx files.,

  • Guest
    Marius Wednesday, 3 October 2012

    No experiences yet with LB but because of this its better to create those bindings in code i think.
    In my first impression (just 15 minutes) i was unable to bind a edit.text to form.caption property. Too complicated?

  • Guest
    Jim Tierney Thursday, 4 October 2012

    Steps to link TEdit.Text and TForm.Caption added.

  • Guest
    C Johnson Friday, 5 October 2012

    Ah, I see the problem. I never got past the fact that it tosses out any changes when you switch the form to source view (alt-f12) instead of saving it. When you return from the dfm source to the designer view, it reloads the last thing saved (if anything. New forms obvious have nothing so it tosses everything out.)

    Still seems half baked to me, and a compelling point that it should be in the dfm not a seperate file.

  • Guest
    Jim Tierney Tuesday, 9 October 2012

    I see the problem too. The LiveBindings designer display settings from the last saved .vlb file are restored when toggling text/form. This issue can be fixed without resorting to .dfm storage. If we can avoid it, we do not store design time settings in runtime files.

  • Guest
    Alejandro Tuesday, 11 June 2013

    No me gusta el LiveBinding genera un archivo mas y ensucia la carpeta de los fuentes y la mayoría de las veces ni se usa. Se debería poder deshabilitar para que no se cree ese archivo si uno no quiere usar esta funcionalidad.

    Además si uno quiere copiar los archivos de un formulario a otro proyecto tiene que acordarse cada vez de mas archivos.

  • Please login first in order for you to submit comments
  • Page :
  • 1

Check out more tips and tricks in this development video: