The BindLinkVCL Sample demonstrates the use of a TBindLink. In general, it is used for linking operations, for example, linking dataset fields to various lists.
You can find Delphi and C++ code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version.
Components used in BindLinkVCL App:
- TBindingsList: Built on the TCustomBindingsList component and publishes additional properties that can be accessed from within the Object Inspector. Add a new binding and select TBindLink under Quick Bindings.
- TBindLink : Built on the TCustomBindLink class and publishes a set of additional properties that can be accessed from within the Object Inspector.
- TBindingSourceDB: Nonvisual component that provides a way to make data contained by the specified data source available to all components that want to access it, using LiveBindings.
- Along with these TDBNavigator, TDataSource,TClientDataset and other UI components such as TLabel, TEdit ,TImage were used.
Implementation Details :
- Use the DBNavigator1 TDBNavigator to navigate through the dataset.
- TBindingsList is used to create managed binding among the different components. TBindLink is used to create bindings to the columns of the dataset.
- The ImageWithHander TImage displays the Graphic Field of the selected fish within the dataset.
- The EditWithHandler TEdit displays the Category Field of the selected fish within the dataset.
- The MaskEditWithHandler TMaskEdit displays the Category Field of the selected fish within the dataset.
- The ListBoxWithHandler TListBox displays the different Categories of the dataset.
- The MemoWithHandler TMemo displays the Notes Field of the selected fish.
- The LabelBind TLabel displays the Category, and Species Name of the selected fish. The LabelPosition TLabel displays the position of the selected fish within the dataset. The information these two TLabels display is defined in the Binding Expression Editor.
- The CheckBoxDatasetActive TCheckBox enables or disables the TDataSource.
Check out the full article in the DocWiki about the BindLinkVCL Sample.