SDropTarget¶
| 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] |
| Content | Object | The only child widget in this widget's content. |
| ForegroundColor | Number Array, Length = 4 | Linear color values, for example:[0.5, 0.5, 0.5, 1] |
| OnDrop | String | The python code which will be executed.. replacement flag: %assets, %assets_folders, %actors |
| ToolTipText | String | |
| Visibility | Enum: EVisibility: Visible, Collapsed, Hidden, HitTestInvisible, SelfHitTestInvisible, All |
functions what can be called from ChameleonData¶
| FunctionName | Description | |
|---|---|---|
| set_color_and_opacity | Set widget's color and opacity. |
Examples¶
Example 1:
"SDropTarget": {
"Text": "SDropTarget",
"HAlign": "Center",
"OnDrop": "gallery.on_drop_func(%**kwargs)",
"Content":
{
"SMultiLineEditableTextBox": {
"ContentPadding": [0, 10],
"Text": "SMultiLineEditableTextBox",
"Aka": "SMultiLineEditableTextBox_2"
}
}
}
Notes:¶
Supported Drop type:
- Assets
- Folder
- Actors
- External file. For instance, drag and drop a file from windows explorer.
- External text. Select some text in Text Editor(Pycharm, sublime, notepad++), and drag and drop it. Not all text editor support drag text.