SCanvas¶
| Property | Type | Note |
|---|---|---|
| Aka | String | Name for the widget |
| Position | Number Array, Length = 2 | |
| Size | Number Array, Length = 2 | For example:[100, 50] |
| Slots | Array | The array which contain children widgets |
| ToolTipText | String | |
| Visibility | Enum: EVisibility: Visible, Collapsed, Hidden, HitTestInvisible, SelfHitTestInvisible, All |
Examples¶
Example 1:
"SCanvas": {
"ToolTipText": "Canvas is a layout widget that allows you to arbitrary position and size child widgets in a relative coordinate space",
"Slots": [
{
"Position": [97.5, 0],
"Size": [25, 20],
"SButton": {"ButtonColorAndOpacity": [0, 5, 0 ,1], "OnClick": "print('Head.')",
"Text": "^_^"
}
},
{
"Position": [90, 22],
"Size": [40, 40],
"SButton": {"ButtonColorAndOpacity": [0, 2, 0 ,1], "OnClick": "print('Body.')"}
}
]
}