Hi, I’m using UI builder to build the UI for my game and I’m using the ListView. How can I hide or change the style of vertical slider in my list view? I’ve done some searching on web and some playing around in the editor but I have no clue how to do this. Thanks.
You can have a look at this thread: Styling the scrollbar of a scrollview
I explain how to search for matching selectors on scrollers and change the styling of the scroller and buttons of the scrollbar. The same thing is applicable to a ListView, because it uses a ScrollView underneath.
For control over a specific ListView, you could name your list view, or add a special class for this styling, and then use a complex selector in your stylesheet to reach these elements specifically, ex: #MyListView .unity-scroller--vertical
1 Like
If you’d prefer not to solve this with stylesheets you can access a ListView’s ScrollView component and disable the scrollbar completely.
myListView.Q<ScrollView>().verticalScrollerVisibility = ScrollerVisibility.Hidden;
5 Likes