SEditableTextBox¶
| Property | Type | Note |
|---|---|---|
| Aka | String | Name for the widget |
| BackgroundColor | ||
| ColorAndOpacity | Number Array, Length = 4 | Linear color values, for example:[0.5, 0.5, 0.5, 1] |
| Font | Object | For example:"Font": |
| 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. |
| Padding | Number or Number Array (Length = 2 or 4) | |
| SelectAllTextWhenFocused | Bool | |
| Style | Object | For example:"Style": |
| 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_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(%))"
}