Label¶
A LabelFormCell control is display-only, non-editable, and does not accept user input. This control displays a single body of text, and its associated properties are applied to the entire body of text. This control is supported in both FormCell Container and FormCell Section and works in both single and multi-column layouts.
When assigning a rule to a property of Label, the rule will be passed an instance of the following proxy class as an argument:
Label Properties¶
| Property | Type | Required | Default |
|---|---|---|---|
| IsVisible | boolean |
No | true |
| MaxLines | integer |
No | |
| Separator | boolean |
No | true |
| Style | string |
No | |
| Text | string |
No | |
| TextWrap | boolean |
No | true |
| _Name | string |
Yes | |
| _Type | const |
Yes |
IsVisible¶
Sets the visibility of the control.
- type:
boolean - default:
true
MaxLines¶
Number of lines of displayed text before truncation.
- type:
integer
Separator¶
Sets the visibility of the separator line below the control. This property will take precedence over the
ControlSeparator in section, only supported for Form Cell control in Sectioned Table and not supported in Form Cell
Container.
- type:
boolean - default:
true
Style¶
Sets the style for the entire LabelFormCell control. The supported styles and CSS properties are listed here: LabelFormCellClass.
- type:
string
Text¶
The text that is displayed.
- type:
string
TextWrap¶
Wraps overflowing display text onto multiple lines.
- type:
boolean - default:
true
_Name¶
- type:
string
_Type¶
- type:
const
The value of this property must be:
"Control.Type.FormCell.Label"
Examples¶
{
"Caption": "FormCell Label Page",
"Controls": [
{
"Sections": [
{
"Controls": [
{
"_Type": "Control.Type.FormCell.Label",
"_Name": "LabelFormCell",
"Text": "/MDKDevApp/Rules/FormCell/SetStartingLabelText.js",
"TextWrap": true,
"Style": "MDKLabelFormCell"
},
{
"Title": "Get Text",
"OnPress": "/MDKDevApp/Rules/FormCell/GetLabelText.js",
"ButtonType": "Primary",
"_Type": "Control.Type.FormCell.Button",
"_Name": "GetTextButton"
},
{
"Title": "Set Text",
"OnPress": "/MDKDevApp/Rules/FormCell/SetLabelText.js",
"ButtonType": "Primary",
"_Type": "Control.Type.FormCell.Button",
"_Name": "SetTextButton"
},
{
"Title": "Get TextWrap",
"OnPress": "/MDKDevApp/Rules/FormCell/GetLabelTextWrap.js",
"ButtonType": "Primary",
"_Type": "Control.Type.FormCell.Button",
"_Name": "GetTextWrapButton"
},
{
"Title": "Set TextWrap",
"OnPress": "/MDKDevApp/Rules/FormCell/SetLabelTextWrap.js",
"ButtonType": "Primary",
"_Type": "Control.Type.FormCell.Button",
"_Name": "SetTextWrapButton"
},
]
}
],
"_Name": "FormCellContainer",
"_Type": "Control.Type.FormCellContainer"
}
],
"_Type": "Page",
"_Name": "Formcell"
}
Style Classes Definition¶
/* Label Form Cell */
.MDKLabelFormCell {
background-color: #f5f505fa;
color: black;
font-size: 20;
font-style: normal;
font-weight: bold;
text-align: center;
text-decoration: underline;
}