SMultiLineEditableTextBox¶
Property | Type | Note |
---|---|---|
Aka | String | Name for the widget |
AlwaysShowScrollbars | ||
AutoWrapText | Bool | |
BackgroundColor | ||
BorderBackgroundColor | Number Array, Length = 4 | Linear color values, for example:[0.5, 0.5, 0.5, 1] |
BorderImage | Object | For example:"BorderImage": |
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 |
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. |
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. | |
scroll_to | Scroll to the Line Inex in SMultiLineEditableTextBox widget |
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"
}