StaticText

You use a StaticText control to display text to the user or to describe a control that does not have text associated with it, such as a list box or edit control.

The user cannot change the text, but you can change the text for a StaticText control in a script by assigning a string to the control's Text property.

StaticText controls have events associated with them, but you will probably seldom write scripts for them because users do not expect to interact with static text.

Indicating accelerator keys

One use of a StaticText control is to label a list box or edit control. If you assign an accelerator key to a list box or edit control, you need to indicate the accelerator key in the text that labels the control. Otherwise, the user would have no way of knowing that an accelerator key is defined for the control. This technique is described in “Defining accelerator keys”.

Indicating a border style

You can select a border style using the BorderStyle property on the General property page.

NoteSelecting the Border property The BorderStyle property will affect only the StaticText control if the Border property check box is selected.