Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
370
Scroll speed
posted

Hi,

I'm coding a drag/drop operation on an ultrawingrid. On the DragOver event I check if my mousecursor is close to the borders. If so a scroll action is performed.

' Check if we need to scroll up/down in the grid

If (pointInGridCoords.Y < 20) Then

    TicketLinesUGrid.ActiveRowScrollRegion.Scroll(RowScrollAction.LineUp)  ' Scroll up

ElseIf (pointInGridCoords.Y > TicketLinesUGrid.Height - 20) Then

    TicketLinesUGrid.ActiveRowScrollRegion.Scroll(RowScrollAction.LineDown) ' Scroll down

End If

This works fine but in some cases a litlle bit to fast. Is there a way to implement such functionality that depending on how close you go to the edge of the control the faster the scroll is performed