SListView¶
Property | Type | Note |
---|---|---|
Aka | String | Name for the widget |
EnableAnimatedScrolling | Bool | |
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. |
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¶
FunctionName | Description | |
---|---|---|
get_list_view_multi_column_items | Get the source items from specified MultiColumn SListView. | |
get_list_view_multi_column_selection | None | |
set_list_view_multi_column_items | Set the source items to specified MultiColumn SListView. | |
set_list_view_multi_column_line | None | |
set_list_view_multi_column_selections | Set the selections of SListView. |
Examples¶
Example 1:
"SListView<MultiColumn>": {
"ItemHeight": 6,
"Aka": "ListViewLeft",
"RichText": true,
"EnableAnimatedScrolling": false,
"SHeaderRow": {
"Columns": [
{
"DefaultLabel": "Property",
"FillWidth": 0.4
},
{
"DefaultLabel": "Value",
"FillWidth": 0.6
}
]
},
"ListItemsSource": [
["Line 0", "ValueA"]
, ["Line 1", "ValueB"]
],
"OnMouseButtonDoubleClick": "objectDetailViewer.on_listview_DetailListLeft_mouse_button_double_click(%Index)",
"OnSelectionChanged": "objectDetailViewer.ui_on_listview_DetailList_selection_changed(bRight=False)"
}
Example 2:
"SListView<MultiColumn>": {
"Aka": "SListViewMultiColumn_B",
"EnableAnimatedScrolling": true,
"SHeaderRow": {
"Columns":
[
{
"DefaultLabel": "Line",
"FillWidth": 0.25
},
{
"DefaultLabel": "A",
"FillWidth": 0.25
},
{
"DefaultLabel": "B",
"FillWidth": 0.25
},
{
"DefaultLabel": "C",
"FillWidth": 0.25
}
]
},
"ListItemsSource": [
["Line 1", "<RichText.red>Red</>", "<RichText.green>Green</>", "<RichText.cyan>Blue</>"],
["Line 2", "<RichText.green>Green</>", "<RichText.cyan>Blue</>","<RichText.red>Red</>"],
["Line 3", "<RichText.cyan>Blue</>","<RichText.red>Red</>", "<RichText.green>Green</>"]
],
"OnSelectionChanged": "print(%Index)",
"OnMouseButtonDoubleClick": "print('double click: {}'.format(%Index))",
"RichText": true
}