Adding Controls to Forms

 

In this Topic Hide

Adding Controls

Arranging Controls

Modifying Controls

Smart Tag

Properties Element

Translating Control Captions

Using the Format Painter

Anchoring Controls

Adding Controls

When you create or open a form the toolbox will update to display only those controls that are available for that particular form type.

Add controls to the form as follows:

1.     In the toolbox select the Form Specific or Other tab.

2.     If you select the Other tab then select the control type from the drop-down list at the top of the toolbox.

3.     Click and drag the control you want to use from the toolbox to the form.

The control will appear in the form and the name of the control in the toolbox will be faded out to show that it is unavailable.

Arranging Controls

Once you have more than one control you may wish to arrange them. There are several buttons available in the Layout section of the Ribbon that will allow you to do this.

The following buttons are available:

Icon

Description

Align left side of the selected objects.

Center the selected objects horizontally.

Align right side of the selected objects.

Align the top of the selected objects.

Center the selected objects vertically.

Align the bottom of the selected objects.

Make horizontal spacing equal.

Increase horizontal spacing.

Decrease horizontal spacing.

Make vertical spacing equal.

Increase vertical spacing.

Decrease vertical spacing.

Bring the selected object to the foreground.

Send the selected object to the background.

 

Modifying Controls

The look and feel of controls, as well as the way the operator interacts with them, can be modified in two different ways.

Smart Tag

On most controls you can access a list of the most important properties using the adornment control.

1.     Select a control.

2.     Click the Smart Tag.

3.     Modify the properties.

4.     Click anywhere outside the properties form to close it.

Properties Element

When you select a component the Properties element updates to display all the properties for it.

Translating Control Captions

Control captions can be translated by modifying the Captions fields within the properties of the control.

Using the Format Painter

The Format Painter allows you to copy the formatting of one control to another.

1.     Select a control and click Format Painter in the Forms tab.

A red box appears around the control.

2.     Click on the control you want to copy the format to. Hold the Ctrl key to select multiple controls.

The color and text format is copied to the control.

Anchoring Controls

Control anchoring allows you to lock the position of a control or automatically resize it when a form is resized.

1.     Select the smart tag in the top-right corner of the control.

2.     Open the Anchor Style drop-down.

Enable the sides that you want to lock in place. In the example above the top and left sides are locked in place. If you want the control to expand with the form enable all four sides.