SMultiLineEditableTextBox

SMultiLineEditableTextBox

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]
ForegroundColor Number Array, Length = 4 Linear color values, for example:[0.5, 0.5, 0.5, 1]
HintText String
Justification String Enum: ETextJustify: Left, Center, Right
LineHeightPercentage Number
Margin Number or Number Array (Length = 2 or 4)
Marshaller String "ChameleonRichText"
OnContextMenuOpening Object JSON Value that contains the menu config. Same as the menu in the MenuConfig.ini
OnTextChanged String The python code which will be executed.
OnTextCommitted String The python code which will be executed.
Padding Number or Number Array (Length = 2 or 4)
SelectAllTextWhenFocused Bool
Style Object For example:"Style":
Text String
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_text_read_only Set the text of widget Read Only or not.
set_color_and_opacity Set widget's color and opacity.

Examples

Example 1:

    "SMultiLineEditableTextBox": 
    {
        "Text": "Muti-line Box\nLine 1\nLine 2\nLine 3",
        "HintText": "This is a SMultiLineEditableTextBox",
        "AutoWrapText": true
    }

Example 2:

    "SMultiLineEditableTextBox": {
        "AutoWrapText": true,
        "HintText": "This is a SMultiLineEditableTextBox",
        "Justification": "Center",
        "LineHeightPercentage": 1.6,
        "Margin": [10, 20],
        "Marshaller": "ChameleonRichText",
        "OnTextChanged": "print(%)",
        "OnTextCommitted": "print('input text: {}'.format(%))",
        "SelectAllTextWhenFocused": true,
        "Text": "<TextStyle FontFamily=\"Roboto\" FontSize=\"15\" FontStyle=\"Regular\" FontColor=\"(R=1,G=0.5,B=0,A=1)\">SMultiLineEditableTextBox</>\n<TextStyle FontFamily=\"Roboto\" FontSize=\"10\" FontStyle=\"Regular\" FontColor=\"(R=0.8,G=0.02,B=0,A=1)\">SMultiLineEditableTextBox line1</>\nSMultiLineEditableTextBox line2",
        "ToolTipText": "Tool Tips"
    }

Back to Support Slates