How do you access and change the attributes of the elements that are created when you click on a DropDownField?

Using the debugger I can see that a ListView containing a ScrollView is created whenever you expand a DropDownField. How do I get at this new VisualElement so I can change things like the scroll speed of the ScrollView? It’s not nested under the root like everything else is.

Have you tried doing scrollView.Q<ScrollView>()?
The ScrollVIew is a child of the ListView however the ListView overrides the contentContainer and hides the ScrollView, If you are trying to access it as a child you will need to use the hierarchy property to find it, e.g scrollView.hierarchy[1]

The ScrollView is nested under a separate “root” which I don’t know how to access. I’ve tried going up the chain and getting the second child of the PanelRootElement (while the DropDownField is open), but this doesn’t work either.

I appreciate the help :slight_smile:

Going up the chain and getting the ListVIew and then querying it with scrollView.Q<ScrollView>() should work.
What does your code look like?

Sorry, you can ignore the previous response. I had scheduled the code in the PointerDownEvent I registered onto the DropDownField to execute after the list was created, but it wasn’t waiting for some reason. Everything is working as it should now, thank you for your time.