Label.Caption
From Xojo Documentation
Property (As String )
aControl.Caption = newStringValue
or
StringValue = aControl.Caption
Supported for all project types and targets.
or
StringValue = aControl.Caption
Supported for all project types and targets.
The caption of a control. This property can be set inside the IDE or programmatically.
Notes
NOTE: If the Caption property contains an ampersand (&) character, it will display only if it is preceded by another ampersand character. For example, if the caption should read "Bread & Butter", enter "Bread && Butter".
This is done to make applications on all operating systems behave consistently. The ampersand is used to denote a keyboard accelerator on Windows.
Controls implementing the Caption property
BevelButton | ||
Checkbox | ||
DataControl | ||
GroupBox | ||
Label (Caption has been deprecated for Label in favor of the Text property.) | ||
PushButton | ||
RadioButton | ||
ToolButton |
Sample Code
This code sets the caption property in the Open event of the control.
Me.Caption = "Hello World"