Top
PowerCOBOL V11.0 User's Guide
FUJITSU Software

4.8 Placing Controls in an Array

Controls on a form can be placed in an array. Each control is then identified with an index value that is automatically determined by PowerCOBOL.

An array may consist only of the same type of controls. You may not mix different control types within a single array. Controls of the same type will be assigned the same name (they are accessed individually with a subscript) and will share the same event procedures. They do not have to share the same properties, however.

If you group together multiple types of controls (for example, you include 3 push buttons and 2 check box controls in a single group), and then right-click once on one of these controls to create a new array, only one array will be created. The array that is created in this case will only include the same control types along with the actual control you actually clicked on to create the new array.

If you created the previously noted group, and right-clicked on one of the command buttons to create a new array, an array of push button controls would be created with the three push buttons. The two check boxes included in the group would be completely ignored. They would not be included in the push button array, nor would a separate array be created for them.

  1. To create an array, click on the first control in the form to be selected for the array.

  2. Press and hold the SHIFT key and click on each subsequent control to be included. Alternatively, you can press and hold the left mouse button and drag it across the controls to select them (a black border temporarily appears to outline the controls you are selecting).

  3. Click on the right mouse button to access the pop-up menu. Move the mouse to Array. This will display a secondary pop-up menu. Click on New Array.

An informational dialog box appears for you to display the name of the newly created array and the number of additional controls added to it. Click on the OK button to close this dialog box.

Note: When controls are selected for an array, they display blue or white 'handles' (the first control has blue handles and subsequent controls have white ones) on each side.