Use the Format Painter
-
Make sure the frmCustomers form is open in Design view.
First you need to select the control whose formatting attributes you want to copy or else format a control so that you can copy its formattingand that's what we'll do in the next steps.
-
Click the LastName text box control to select it.
We want to format this control so that we can copy its formatting attributes and paste them to other controls on the form.
-
Click the Font/Fore Color button list arrow on the Formatting toolbar and select a red color, then click the Bold button on the Formatting toolbar, and finally click the Special Effect button list arrow on the Formatting toolbar and select the Raised effect.
The control is now formatted with bold red text and a raised effect.
It took some work to apply that formatting, didn't it? Now imagine you want to format all the controls on the form with the same formatting options. Instead of doing all that formatting, you can use the Format Painter tool to copy the formatting from the LastName text box control and paste or apply the copied formatting to the other controls on the form. First, you need to select the control with the formatting you want to copy and then do one of the following:
-
Single-click the Format Painter button: Copy and apply the formatting to a single control.
-
Double-click the Format Painter button: Copy and apply the formatting to multiple controls. Click the Format Painter button when you're finished pasting the formatting.
Since we want to paste the LastName text box control's formatting to several controls, we'll double-click the Format Painter button.
-
-
With the LastName text box control still selected, double-click the Format Painter button on the toolbar, as shown in figure.
Notice that the pointer changes to a . Next, you need to paste, or apply the copied formatting.
-
Click the Phone text box control with the Format Painter ().
The Format Painter applies the copied formatting to the Phone text box control, saving you some time and work from manually formatting the control. Since we double-clicked the Format Painter, the pointer remains a so that we can paste the copied formatting to multiple controls.
-
Click the FirstName text box control with the ( ).
When you're finished with the Format Painter, click the Format Painter button to switch the pointer back to an ordinary selection arrow.
-
Click the Format Painter button on the Formatting toolbar to stop pasting formatting attributes.
You're finished with this lesson so...
-
Click the Close button to close the frmCustomers form and click No to close without saving your changes.
To copy formatting with the format painter:
-
select the control with the formatting options you want to copy.
-
click the format painter button on the toolbar.
-
select the control where you want to apply the copied formatting.
to copy selected formatting to several locations:
-
select the control with the formatting options you want to copy.
-
double-click the format painter button.
-
select the controls where you want to apply the copied formatting.
-
click the format painter button when you're finished.