Connecting controls

Connecting controls

The chapter Getting started told you how to set up blueshell Active Tables to let the user edit a table thru a grid view. In a grid view each record of the table is shown as a row of the grid. Each column of the grid belongs to a field of the table. bAt supports an additional mode: Form view. In form view a single record of the table is shown on the form. There are some controls on the form and each control can be bound to a field of the table. Unlike in grid view there can be additional unbound controls, supporting additional information or controlling options like command buttons do.

Binding controls to a data source can also be done in traditional VB programming. There are even wizards that are doing parts of the designer's work for you. If you want to design a framework that supports a grid view and a form view a complex and fragile structure has to be set up:

Using bAt live is easier:

How to do

There are several alternatives to connect the txt control to an atb control:

Other blueshell controls

chk and cbo controls are working as described above for txt controls.

Other controls

You may implement an IBatControl interface to bind other controls.

Using the bAt Master

Often it is necessary to add a lot of controls to an atb control. As outlined above bAt makes it easy to bind controls, but if you perhaps have to bind 20 or more of them it may be still cumbersome to add and bind them, to provide captions and to position properly. The bAt Master Add-In can help you doing this. Just give it a try!