IControl.Text

Syntax

Text: String;

Description

The Text property determines the string identifying a component for a user. It connects some string of the text that explains a user the purpose of this component, with the component.

Comments

By default Text corresponds to the component name. The character of quick access can be specified in the Text property for the control components (buttons, flags, switches, and so on.) The ampersand character - &- should be set before the appropriate character to do it. The character that follows after the ampersand, is displayed underlined and it is a character of quick access: pressing of this character or pressing of the combination ALT+ the character should be equal to selection of appropriate control component during form execution. The OnClick event is also generated for the component.

If the ampersand character should be entered in the text of Text string, it should be repeated twice: &&.

If the Resources property is set in the form that houses the component, the ResourcesID additional attribute is added to the Object Inspector for the Text property which enables the user to determine the resources elements from which the values for the property will be taken:

The change of the value of the Text property causes the change of the value of the appropriate element of for the default language.

When the value of the ResourcesID property is changed, the identifier of the appropriate element is changed in the connected to the form resources property. It is necessary to press button in the ResourcesID field to compare the text property of the component with another string element of the resource. The Select string dialog box is opened:

All string elements of the resources connected to the form are contained in this dialog. The value of identifier and the value for default language are displayed for each element of resources. OK button should be pressed after selection of new string element.

See also:

IControl | Resources