Previous Topic

Next Topic

Inhoudsopgave

Book Index

Working With Controls

Adding/Deleting Controls

Select the control you wish to add to your custom form in one of the tabs of the component palette. Then click the area in the Form designer where you want to put the control. The control is now added to your form. To delete a control, select the control in your form and press DEL.

Selecting Controls

You can select one or more controls to specify properties, to move these controls or to align them.

Moving Controls

Use your mouse or your keyboard to move the selected controls on the form. Use your mouse to drag the selected controls. Use CTRL+ARROW to move your selection by 1 pixel. If you press SHIFT+ARROW, the selection will be repositioned in larger steps.

Resizing Controls

To resize a control, point to the any edge of the control. When the pointer changes to a double-headed arrow, drag the edge of the box to change its width.

Aligning Controls

Use the Align to grid option in the shortcut menu of the Form designer area to align all controls. Use the Snap to grid option to align a control a soon as it is added to the Form designer area. You can use the Alignment palette for further options

Bring To Front/Send To Back

Use the Bring To Front and Send To Back options in the shortcut menu of the Form designer area to set the Z order of components. If components overlap, you can use the Z order to determine which element is brought to the front and which is sent to the back.

Setting Up Containers

It can sometimes be useful to group a number of components in a container component. For this, you can use a Panel component. If you move a Panel component, the Label and Edit components are automatically moved as well. The Panel component becomes the parent of the Label and the Edit components added to the Panel component. The Label and Edit components become the child of the Panel. Use ESC to select the parent of a control.

Copying, Cutting and Pasting

You can use all standard copy, cut and paste options for the selected controls.