I created a multi column list view with 5 columns like this:
<ui:MultiColumnListView name="ListViewLV" fixed-item-height="35" show-border="true" style="-unity-text-align: uppOk, er-left; text-overflow: clip; align-self: auto; align-items: stretch; transform-origin: center; position: relative; ">
<ui:Columns>
<ui:Column name="column1" title="NAME" width="250" />
<ui:Column name="column2" title="FILENAME" width="150" />
<ui:Column name="column3" title="NO" width="50" />
<ui:Column name="column4" title="COMMENTS" width="250" />
<ui:Column name="column5" title="RESPONSIBLE" width="250" />
<ui:Column name="column6" title="STATE" width="80" />
</ui:Columns>
</ui:MultiColumnListView>
Then I wanted to have the column title background color changed.
I found the following way:
ListViewLV = rootVE.Q(“ListViewLV”);
VisualElement myListViewLVStyleElement = ListViewLV.Q(className: “unity-multi-column-header__column__default-content”); myListViewLVStyleElement.style.backgroundColor = Color.white;
Unfortunately this only works for the first column. All other colums keep their default gray color.
How can I access the other colums?!?