TQTXListViewItem
TQTXListView manages a set of child widgets (TQTXListViewItem) in a typical left-to-right layout, with support for single or multi-selection. The listview purely cares about child elements of type TQTXListViewItem and will ignore other elements.
To simplify styling of child elements attributes are used to reflect which child element is selected, and which is not. This is purely to future-proof the widget and it's not really used by TQTXListView itself.
Attribute name |
Value |
data-listitem-selected |
TRUE |
Note: When unselected the entire attribute is removed, there is no need to write css rules that checks for "false".
This attribute is purely meant for the user, giving you an extra opportunity to alter the look of the selection without overriding code or capturing events. TQTXListView will add the TQTXListViewItemSelected CSS style to all selected children, and remove the style when un-selected. So you have effectively two neat ways of shaping what a selection should look like.