Bootstrap Chameleon Logo

STextBlock

STextBlock

Property Type Note
Aka String Name for the widget
AutoWrapText Bool
ColorAndOpacity Number Array, Length = 4 Linear color values, for example:[0.5, 0.5, 0.5, 1]
Font Object For example:"Font":
Justification String Enum: ETextJustify: Left, Center, Right
LineHeightPercentage Number
Margin Number or Number Array (Length = 2 or 4)
MinDesiredWidth Number
OnDoubleClick
ShadowColorAndOpacity Number Array, Length = 4 Linear color values, for example:[0.5, 0.5, 0.5, 1]
ShadowOffset Number Array, Length = 2 For example:[1, 1]
Text String
TextStyle String For example:"TextStyle":
ToolTipText String
Visibility Enum: EVisibility: Visible, Collapsed, Hidden, HitTestInvisible, SelfHitTestInvisible, All

functions what can be called from ChameleonData

FunctionName Description
set_text Set the text of widget:
get_text Get the text of widget.
set_color_and_opacity Set widget's color and opacity.

Examples

Example 1:

    "STextBlock":
    {
        "Text": "TextBlock"
    }

Example 2:

    "STextBlock":
    {
        "Text": "Label Text",
        "ColorAndOpacity": [0,0.5,1,1],
        "Font": {
            "Style": "FEditorStyle",
            "StyleName": "FontAwesome.16"
        },
        "ShadowOffset": [2,2],
        "ShadowColorAndOpacity": [0,0,0,0.75],
        "Justification": "Right"
    }

Example 3:

    "STextBlock":
    {
        "Text": "A lot of text, ABCDEFG, HIJKLMN, OPQ, RST, UVW, XYZ. abcdefg, now i can sing my ABC.",
        "TextStyle": {
            "Style": "FEditorStyle",
            "StyleName": "LargeText"
        },
        "ColorAndOpacity": [1,1,1,1],
        "AutoWrapText": true,
        "Justification": "Center"
    }