Condividi tramite


Textboxes User Interface Dialog Box

Textboxes dialog boxes are used to present up to four text entry fields to a user and to return the contents of those fields during installation. Three Textboxes dialog boxes are available: Textboxes (A), Textboxes (B), and Textboxes (C). These three dialog boxes are identical; each can be added only one time for each deployment project.

The dialog boxes contain four text boxes with associated labels, plus additional labels to present information to the user. The text for these labels is specified at design time in the Properties window. Additional properties are provided for each text box to control visibility, to set default text, and to return a value.

The following illustration shows a typical Textboxes dialog box, as it would appear during installation.

Textboxes dialog box

Deployment UI splash screen

Properties

The following properties are available for the Textboxes dialog box.

Property

Description

BannerBitmap

Specifies a bitmap or JPEG image to be displayed in the banner area. In the previous illustration, the default bitmap is shown. For more information, see BannerBitmap Property.

BannerText

Specifies the text to be displayed in the banner area. In the previous illustration, this corresponds to "This is the banner text."

BodyText

Specifies the text to be displayed above the text boxes. In the previous illustration, this corresponds to "This is the body text."

Edit1Label

Specifies the text to be displayed above to the first text box. In the previous illustration, this corresponds to "First entry field".

Edit1Property

Specifies a property name that is used to retrieve the text entered in the first text box. This property can be used in conditions. For more information, see Conditional Deployment.

Edit1Value

Specifies the initial value (text) of the first text box.

Edit1Visible

Specifies whether the first text box is visible or hidden. This should be set to true for a dialog box that displays one or more text boxes.

Edit2Label

Specifies the text to be displayed above to the second text box. In the previous illustration, this corresponds to "Second entry field".

Edit2Property

Specifies a property name that is used to retrieve the text entered in the second text box. This property can be used in conditions. For more information, see Conditional Deployment.

Edit2Value

Specifies the initial value (text) of the second text box.

Edit2Visible

Specifies whether the second text box is visible or hidden. This should be set to true for a dialog box that displays two or more text boxes, or to false for a dialog box that displays a single text box.

Edit3Label

Specifies the text to be displayed above to the third text box. In the previous illustration, this corresponds to "Third entry field".

Edit3Property

Specifies a property name that is used to retrieve the text entered in the third text box. This property can be used in conditions. For more information, see Conditional Deployment.

Edit3Value

Specifies the initial value (text) of the third text box.

Edit3Visible

Specifies whether the third text box is visible or hidden. This should be set to true for a dialog box that displays three or more text boxes, or to false for a dialog box that displays two or fewer text boxes.

Edit4Label

Specifies the text to be displayed above to the fourth text box. In the previous illustration, this corresponds to "Fourth entry field".

Edit4Property

Specifies a property name that is used to retrieve the text entered in the fourth text box. This property can be used in conditions. For more information, see Conditional Deployment.

Edit4Value

Specifies the initial value (text) of the fourth text box.

Edit4Visible

Specifies whether the fourth text box is visible or hidden. This should be set to true for a dialog box that displays four text boxes, or to false for a dialog box that displays three or fewer text boxes.

Controlling the Appearance of the Textboxes Dialog Box

Several properties control how the Textboxes dialog box will appear to the user during installation.

  • The BannerBitmap property controls the image that appears in the upper-right corner of the dialog box. The position and size of the image are fixed.

    Tip

    For a consistent user interface, the same image should be used for all dialog boxes in an installer.

  • The BannerText property controls the text that is displayed in the banner across the top of the dialog box. The position, size, and font size are fixed. The text will wrap but cannot be more than two lines.

  • The BodyText property controls the text that appears just underneath the banner section of the dialog box. The position, size, and font size are fixed. The text will wrap but cannot be more than four lines.

  • The EditNLabel properties control the text in the text box labels. The position and font size are fixed, and the text will not wrap.

    Tip

       For dialog boxes that may be localized, allow extra space for the text expansion. A word in one language may translate into a much longer word in another language, which causes the text to be cut off.

Retrieving User Information by Using Textboxes Dialog Box Properties

When the installer that contains the Textboxes dialog box is run, the user can enter information into any visible text box. You can then use that information in another phase of installation.

For example, you might create a Textboxes dialog box that enables a user to enter a workgroup name to be stored in a registry entry. In this case, you would set the Edit1Label property to "Enter your workgroup name." You would also set the Edit2Visible, Edit3Visible, and Edit4Visible properties to False, because you only need one text box.

If you think that users will usually want to use a workgroup named "Default," you can enter Default in the Edit1Value property. This will be the initial entry that the user sees in the text box.

In the registry, you would set the Condition property for the workgroup name registry entry to the value of the Edit1Property property; for example, [EDITA1].

During installation, the Condition property is evaluated. If the user enters a name (or accepts the default), that name will be added to the registry; if it is blank, no registry entry will be created.

See Also

Concepts

Deployment and the Run-Time User Interface

Installation Dialog Box Restrictions

Other Resources

User Interface Management in Deployment

Deployment Dialog Boxes