Links

Label

Represents a label control.
Wisej Label controls are used to display text or images that cannot be edited by the user. They are used to identify objects on a form—to provide a description of what a certain control will do if clicked, for example, or to display information in response to a run-time event or process in your application. Because the Label control cannot receive focus, it can also be used to create access keys for other controls.
For a full list of properties, methods and events see the API documentation.

Features

AutoSize

When the AutoSize property is set to true, the Label control will automatically adjust itself to fit the size of it's text content.
A BorderStyle is applied to the Labels to show the AutoSize functionality.

HTML

The Label control can be scaled to any level of complexity by utilizing the AllowHtml property. This property controls whether the value applied to the Text property will be interpreted as HTML.
Label control with AllowHtml = true, demonstrates gradient text and emojis.

Mnemonics

Mnemonics can be used to provide shortcuts for form navigation. By pressing ALT + the Mnemonic key on a Label control, the focus will automatically be applied to the control at the next TabIndex. Mnemonic keys are specified with an ampersand (&) .
Certain controls come with a Label property that allows it to display a label without having to create a separate Label control, see the link below.

How To

Customize the Appearance

The Label control is fully customizable through the Font, Text, AllowHTML, and AppearanceKey properties.

Font

Like most other controls in Wisej, the Label control has a Font property that allows for customization of the size, features, and style of font to use for the control.
Label with "Bangers" Google Font.

AllowHtml

When set to true, the Label's Text property will be interpreted as HTML content, allowing for full customization of the control.

Appearance Key

The AppearanceKey property of the control can be used to give the Label a custom look. This can be based off of another control already defined in the theme (i.e. button) or as an entirely new appearance defined in a mixin.
MyTextLabel.mixin.theme
{
"appearances":
{
"myTextLabel":
{
"inherit": "textlabel",
"states":
{
"default":
{
"styles":
{
"backgroundColor": "blue"
}
}
}
}
}
}

Advanced

JavaScript Widget

Item
Description
Class name
"wisej.web.Label"
Theme appearance
"textlabel", see Themes.
Source code