Label
Represents a label control.
The Wisej.NET 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.
Features
AutoSize
When the AutoSize
property is set to true
, the Label
control will automatically adjust itself to fit the size of its text content.

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.

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 (&
).

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.NET, the Label
control has a Font
property that allows for customization of the size, features, and style of font to use for the control.

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.
{
"appearances":
{
"myTextLabel":
{
"inherit": "textlabel",
"states":
{
"default":
{
"styles":
{
"backgroundColor": "blue"
}
}
}
}
}
}
Advanced
JavaScript Widget
Class name
"wisej.web.Label"
Theme appearance
"textlabel", see Themes.
Child components
"label" is the text container. See JavaScript.
Source code
Last updated
Was this helpful?