SEditableTextBox

SEditableTextBox

Property Type Note
Aka String Name for the widget
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
MinDesiredWidth Number
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.
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:

    "SEditableTextBox":
    {
        "Text": "Read only SEditableTextBox",
        "IsReadOnly": true
    }

Example 2:

    "SEditableTextBox":
    {
        "Text": "",
        "SelectAllTextWhenFocused": true,
        "HintText": "Type some thing, and press enter",
        "OnTextChanged": "print(%)",
        "OnTextCommitted": "print('input text: {}'.format(%))"
    }

Back to Support Slates