ScrollView mosedown / pointerdown events are not sent when scrolling

I want to get callbacks whenever the scrolltop changes.
Why: because I want to increase the framerate during scroll action and throttle framerate when done.

I am trying with RegisterCallback and RegisterCallback to find out when user is doing something.
But those get only called when there is a click on the view. A scrolling with two fingers on macbook or by swiping on ios however does not emit these events.

I will also need the same to work for sliders when being moved.

So, how would I do that?
And what is the difference between mouse and pointer?

anybody? @alexandred_unity

There are quite a few different events you will need to monitor. Take a look at OnAttachToPanel to see the ones we use

This will give you scrolling inside the pane, you then also need each scrollbar.

As you will see above we currently use m_ContentAndVerticalScrollContainer however this will soon be changing to mainly use contentContainer instead, due to some bug fixes with touch handling.

thank you. so there is nothing like OnScrolltopChanged ? Maybe there should be! :wink:

Not at the moment but there are some planned callbacks for when the scroll offset is modified. This should come along with the binding improvements in the future TBC.

1 Like