Download Now

    Reference Codebot.Binding.pas

    Part of the Codebot package

    The Codebot.Binding unit lets you link components so that a change in one of them is passed on to the others. TComponentBinding holds the bound components by name, so they are saved with your form, and they must have the same owner as the binding.

    To write a binding, descend from TComponentBinding, choose which classes can be bound with AcceptClass, and decide what a change does by overriding DoChange. A bound component calls Change on its IComponentBinding to pass a change on, and components that implement IComponentBindingClient are given a reference to the binding they belong to. Changes made while the binding is already passing one on are ignored, so bound components can update each other without looping.

    TExplorerBinding in the codebot_windows_shell package is built this way.

    Items 33 items

    NameKindLine
    IComponentBindinginterface23
    Changeprocedure26
    GetInstancefunction25
    Instanceproperty28
    IComponentBindingClientinterface34
    GetBindingfunction36
    SetBindingprocedure37
    Bindingproperty39
    TComponentBindingclass47
    Acceptfunction101
    AcceptClassprocedure69, 71
    Addprocedure95
    Assignprocedure89
    BeforeDestructionprocedure87
    BeginUpdateprocedure91
    Changeprocedure62
    Clearprocedure99
    Containsfunction103
    Createconstructor85
    DefinePropertiesprocedure64
    Destroydestructor86
    DoAddprocedure75
    DoChangeprocedure73
    DoRemoveprocedure77
    EndUpdateprocedure93
    GetInstancefunction61
    Loadedprocedure65
    Notificationprocedure78
    Refreshprocedure67
    Removeprocedure97
    NotifyComponentproperty80
    NotifyCountproperty82
    TComponentBindingClassclassref106