From Xojo Documentation

Revision as of 23:37, 27 January 2022 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!

Class (inherits from DesktopUIControl)

New in 2021r3

Displays read-only text.

AcceleratorKey DropObject MouseEnter
Closing FocusLost MouseExit
ConstructContextualMenu FocusReceived MouseMove
ContextualMenuItemSelected KeyDown MouseUp
DragEnter KeyUp MouseWheel
DragExit MouseDown Opening
DragOver MouseDrag
Active fa-lock-32.png Left TabIndex
AllowAutoDeactivate LockBottom Text
AllowTabStop LockLeft TextAlignment
Bold LockRight TextColor
Enabled LockTop Tooltip
FontName MouseCursor Top
FontSize Multiline Transparent
FontUnit Name fa-lock-32.png Underline
Handle fa-lock-32.png PanelIndex Visible
Height Parent Width
Index fa-lock-32.png Scope fa-lock-32.png Window fa-lock-32.png
Italic Selectable
AcceptFileDrop AcceptTextDrop Refresh
AcceptPictureDrop Close SetFocus
AcceptRawDataDrop DrawInto


You can define an accelerator character for a DesktopLabel. In the Text property, precede the accelerator character with an ampersand. For example, the entry "&Home" signifies that the H is the accelerator. Pressing Alt+H on Windows triggers the AcceleratorKey event.

Labels on macOS are not meant to ever appear disabled. As a result, the Enabled property of a Label has no effect on macOS.

Sample Code

The following code sets the text of the Label:

Me.Text = "Hello World"

See Also

DesktopUIControl class; DesktopTextArea, DesktopTextField control.