SListView¶
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] |
EnableAnimatedScrolling |
Bool |
|
ForegroundColor |
Number Array, Length = 4 |
Linear color values, for example:[0.5, 0.5, 0.5, 1] |
ItemHeight |
Number |
|
ListItemsSource |
String Array |
|
OnContextMenuOpening |
Object |
JSON Value that contains the menu config. Same as the menu in the MenuConfig.ini |
OnMouseButtonDoubleClick |
String |
The python code which will be executed. |
OnSelectedChanged |
String |
The python code which will be executed.. replacement flag: %item or %index |
OnSelectionChanged |
String |
The python code which will be executed. replacement flag: %index or % |
RichText |
Bool |
|
ToolTipText |
String |
|
Visibility |
Enum: EVisibility: Visible, Collapsed, Hidden, HitTestInvisible, SelfHitTestInvisible, All |
|
functions what can be called from ChameleonData¶
Examples¶
Example 1:
"SListView": {
"ItemHeight": 10,
"Aka": "AList",
"ListItemsSource": ["Item A", "Item B", "Item C"],
"SHeaderRow": {
"Columns": [
{
"DefaultLabel": "List Label",
"FillWidth": 1
}
]
},
"OnContextMenuOpening":
{
"items":
[
{
"name": "ContextMenu A",
"Command": "print ('ContextMenu A')"
},
{
"name": "ContextMenu B",
"Command": "print ('ContextMenu B')"
}
]
},
"OnSelectedChanged": "print ('Selected: {} index: {}'.format(%item, %index))",
"OnMouseButtonDoubleClick": "print ('Double click: {} index: {}'.format(%item, %index))"
}