Bootstrap Chameleon Logo

SListViewMultiColumn

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.
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
set_color_and_opacity Set widget's color and opacity.
get_list_view_multi_column_items Get the source items from specified MultiColumn SListView.
get_list_view_multi_column_selection Get the selected indices of Slistview.
set_list_view_multi_column_items Set the source items to specified MultiColumn SListView.
set_list_view_multi_column_line Set one line items to specified MultiColumn SListView.
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
}