Skip to main content

Home > blockly > FieldLabel

FieldLabel class

Class for a non-editable, non-serializable text field.

Signature:

export declare class FieldLabel extends Field<string> 

Extends: Field<string>

Constructors

ConstructorModifiersDescription
(constructor)(value, textClass, config)Constructs a new instance of the FieldLabel class

Properties

PropertyModifiersTypeDescription
EDITABLEbooleanEditable fields usually show some sort of UI indicating they are editable. This field should not.
maxDisplayLengthnumberText labels should not truncate.

Methods

MethodModifiersDescription
configure_(config)protected
doClassValidation_(newValue)protectedEnsure that the input value casts to a valid string.
initView()Create block UI for this label.
setClass(cssClass)Set the CSS class applied to the field's textElement_.