Class sap.m.LabelModule: sap/m/Label
The Label control is used in a UI5 mobile application to provide label text for other controls. Design such as bold, and text alignment can be specified.
sClassName
and enriches it with the information contained in oClassInfo
. Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.
The supported settings are:
- Properties
In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.
{string} | sId? | ID for the new control, generated automatically if no ID is given |
{object} | mSettings? | Initial settings for the new control |
sClassName
and enriches it with the information contained in oClassInfo
. oClassInfo
might contain the same kind of information as described in sap.ui.core.Control.extend.
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
{function} | Created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
design
. Sets the design of a Label to either Standard or Bold.
Default value is Standard
.
{sap.m.LabelDesign} | Value of property design |
labelFor
, or null
. {sap.ui.core.Control} |
required
. Indicates that user input is required in the input this label labels.
Default value is false
.
{boolean} | Value of property required |
text
. Determines the Label text to be displayed.
{string} | Value of property text |
textAlign
. Available alignment settings are "Begin", "Center", "End", "Left", and "Right".
Default value is Begin
.
{sap.ui.core.TextAlign} | Value of property textAlign |
textDirection
. Options for the text direction are RTL and LTR. Alternatively, the control can inherit the text direction from its parent container.
Default value is Inherit
.
{sap.ui.core.TextDirection} | Value of property textDirection |
width
. Determines the width of the label.
Default value is .
{sap.ui.core.CSSSize} | Value of property width |
design
. Sets the design of a Label to either Standard or Bold.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Standard
.
{sap.m.LabelDesign} | sDesign | New value for property design |
{sap.m.Label} | Reference to this in order to allow method chaining |
labelFor
. {sap.ui.core.Control} | oLabelFor | Id of an element which becomes the new target of this labelFor association; alternatively, an element instance may be given |
{sap.m.Label} | Reference to this in order to allow method chaining |
required
. Indicates that user input is required in the input this label labels.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
{boolean} | bRequired | New value for property required |
{sap.m.Label} | Reference to this in order to allow method chaining |
text
. Determines the Label text to be displayed.
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sText | New value for property text |
{sap.m.Label} | Reference to this in order to allow method chaining |
textAlign
. Available alignment settings are "Begin", "Center", "End", "Left", and "Right".
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Begin
.
{sap.ui.core.TextAlign} | sTextAlign | New value for property textAlign |
{sap.m.Label} | Reference to this in order to allow method chaining |
textDirection
. Options for the text direction are RTL and LTR. Alternatively, the control can inherit the text direction from its parent container.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Inherit
.
{sap.ui.core.TextDirection} | sTextDirection | New value for property textDirection |
{sap.m.Label} | Reference to this in order to allow method chaining |
width
. Determines the width of the label.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is .
{sap.ui.core.CSSSize} | sWidth | New value for property width |
{sap.m.Label} | Reference to this in order to allow method chaining |