Modifying Autoload Controls

Although you cannot change an autoload control's style from PAGED to UNPAGED (or vice-versa), you can customize other aspects of the control's appearance or behavior using the Property window, just as for other controls. You can change the control font, background colors, column sizes, overall height and width, layout data information, event and exception procedures, and so on, without affecting the automatically-generated code used to load the control at run-time.

To make it easier to modify the code generation for controls created using the Autoload window, a special property has been added to the Property window for combo box, grid, and list box controls. This property, Autoload, indicates whether a control has been created using the Autoload feature. If Autoload is set to 1, AcuBench is generating the code to load the control. If Autoload is set to 0, the control is being loaded manually. This special property is used only by the Screen Designer and does not appear in the Screen Section definition for the control. If you have created a control manually, you cannot set its Autoload property to 1 to prompt AcuBench to start generating the code for the control. Instead, open Drag-and-Drop and create a new control using the Autoload feature.

To modify the data portion of a control created through the Autoload interface:

  1. Click the control in the Screen Designer.
  2. In the Property window, next to the Autoload property, click in the Value column.
  3. Click the Browse (...) button to open the Autoload window for the selected control.

    You can now change which fields are displayed in the control, which direction the data file is read, or even which FD is used to read records into the control.

Note that if you make changes to a control's layout that are tied to the data in the control (modifying the text of the heading cells in a grid or changing column widths in a grid or list box), those changes will be lost if you open the Autoload dialog box and change your field selections. Other sorts of property changes, such as selecting a new background color or adjusting the font, are not affected by modifications made through the Autoload interface. Changes cannot be made to additional controls created by the Autoload interface, such as labels.