From Xojo Documentation

Revision as of 19:12, 23 July 2021 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As String )
aDesktopLabel.Text = newStringValue
StringValue = aDesktopLabel.Text

New in 2021r3

Supported for all project types and targets.

The text to display in the Label.


You can define an accelerator character for a Label. In the Text property, precede the accelerator character with an ampersand. For example, the entry "&Home" signifies that the H is the accelerator. Now, pressing Alt+H on Windows triggers the AcceleratorKey event where you will typically set focus on the related TextField (or other related control).

To specify an "&" in the label text, use two in a row: "&&".

Sample Code

The following example sets the text of the Label.

Me.Text = "Hello World"