| Reference information | |
|---|---|
| Project page | Installer Dialogs |
| Related topics | Working with attribute panes |
A StaticText control displays a text string, usually as a label for another control or as explanatory text in a dialog box. It can also display dynamic text strings that are linked to a symbolic variable anywhere in the project, or act as a hyperlink that opens a web page, a file, or executes installer actions when clicked.
Tip: To use a StaticText control as a label for another control, the StaticText control should precede the other control in the dialog's tab order. You can achieve this in the Dialogs tree on the Installer Dialogs project page by moving the StaticText control to immediately above the other control.
The Windows Installer equivalent is the Text
control, although that control does not support hyperlinks and is restricted
to dynamic text strings that originate in the control's parent dialog box.
You can use a StaticText control to display a dynamic text string by linking it to a symbolic variable (see Symbol name below). The control's text will be updated each time the variable's value changes.
Tip: You can also use a Set Window State action to set the StaticText control's text (or any other control's text).
Tarma's StaticText controls can also be used as hyperlinks: if the user clicks on a hyperlink control, the corresponding web page is opened or one or more actions are executed.
You can create a hyperlink-type StaticText control as follows:
Do one of the following:
This pane contains the following attributes and options.
| Attribute | Description | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Control ID |
Select a control ID from the drop-down list or type a numerical ID to use for this control. All controls within a dialog must have different control IDs. For StaticText controls, you should generally select Automatic. However, if you want a hyperlink-type control to behave as a PushButton control (in particular, if you want Tarma Installer to execute the same default action), then you should select the appropriate IDxxx value. See Dialog Control IDs for an explanation of the available control IDs and their usage. |
||||||||||||||||||||||
| Name | Enter the internal name for the control. This name is for use in Tarma ExpertInstall only; it is not used in the installer. All control names must be unique within their parent dialog box. | ||||||||||||||||||||||
| Type |
Select the desired StaticText control behavior from the drop-down list. The following choices are available:
|
||||||||||||||||||||||
| Caption |
Enter the text for the control's caption; any symbolic references in the Caption are resolved when the control is first displayed. If Type is set to Dynamic, this text will be replaced by the linked variable's value when the dialog is shown and updated whenever the variable's value changes (see Symbol name below). If you want a letter to appear underlined and act as a keyboard accelerator (as in the Windows' Label: style), you should prefix the letter with an ampersand ('&'). For example, &Label will appear as Label in the dialog box. Note: The visibility of the underline is subject to the Windows settings on the target system (and your own development system); on Windows 2000 and later, the underline only appears if you first press the Alt key. |
||||||||||||||||||||||
| Hyperlink |
Enter the hyperlink target path. This can be anything that the Win32 function ShellExecute knows how to handle, including URLs such as http://www.tarma.com/ and mailto:support@tarma.com (be sure to include the appropriate protocol identifier), or file paths such as <WindowsFolder>\notepad.exe (an executable program) and <INSTALLDIR>\Readme.txt (a document file). You can leave this field empty if you want to use the hyperlink-style control to execute a different action than opening a URL or file. In that case, either assign the appropriate predefined IDxxx control identifier in the Control ID field, or define an event handler for the control's OnClicked event with the desired actions. |
||||||||||||||||||||||
| Symbol name |
Enter the name of the product variable to which the control must be linked, or click ... (browse) to open the Select Product Variable dialog box that allows you to select a variable from the project. The control's caption will display the value of the linked variable and will be updated automatically whenever the variable's value changes. |
||||||||||||||||||||||
| Indirect | Check this box to make the Symbol name link indirect; clear it for a direct link. If the link is indirect, the variable specified in the Symbol name field is used to obtain the name of a second variable, and it is this second variable whose value is monitored by the control. With a direct link, the variable specified by the Symbol name attribute itself is monitored. | ||||||||||||||||||||||
| Format |
Select the desired format for the dynamic control text from the drop-down list. The following choices are available:
|
||||||||||||||||||||||
| Condition | Enter the display condition for the control or leave empty to display the control unconditionally. See Dialog Control Conditions for more information. | ||||||||||||||||||||||
| Font | Select the font style for the text in the control by clicking ... (browse) to open the Select Font Style dialog. If no font style is selected, the control uses the parent dialog's font style. You can remove the font style by clicking X (clear). | ||||||||||||||||||||||
| Visible Enabled Tab stop Group Border Sunken Client edge Transparent Don't mirror |
These are all standard control styles; see Dialog Control Styles for a description. Note: If you select Transparent, then the Backgnd color option (see below) will be ignored. |
||||||||||||||||||||||
| No prefix | Check this box to display ampersands (&) in the control's Caption text as-is; clear it to interpret them as keyboard accelerators. In the latter case, the ampersand itself is not displayed, but the character following it is underlined and acts as an Alt+character keyboard accelerator. You should check this box if you don't want this behavior. | ||||||||||||||||||||||
| V centered | Check this box to center the Caption text vertically in the control; clear it to align it at the top of the control's area. | ||||||||||||||||||||||
| Ellipsis |
Select the desired behavior if the control's Caption text is longer than the width of the control. The following choices are available:
|
||||||||||||||||||||||
| Align |
Select the desired alignment for the control's Caption text. The following choices are available:
|
||||||||||||||||||||||
| Color |
Select the desired text color from the drop-down list. The following choices are available:
Note: The actual display colors depend on the Windows' settings. If the user has selected a different color scheme, then the control will use the appropriate colors from that scheme. |
||||||||||||||||||||||
| Backgnd |
Select the desired background color from the drop-down list. The following choices are available:
Note: The actual display colors depend on the Windows' settings. If the user has selected a different color scheme, then the control will use the appropriate colors from that scheme. Note: If you select Transparent, then the Backgnd color option will be ignored. |