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
1110
Scrollbar does not move in ultrapanel when setting AutoScrollPosition
posted

I have a panels containing a bigger panel and AutoScroll = True.

I have switched from a normal panel to an UltraPanel and setting the AutoScrollPosition. When I do this in a normal panel, the scrollbar moves but in the UltraPanel it does not.

This is my code in the eventhandler of the mousewheel (UltraPanel1 contains UltraPanel2):

Private Sub panel1_MouseWheel(sender As Object, e As System.Windows.Forms.MouseEventArgs)
       Dim numberOfPixelsToMove As Integer = e.Delta * SystemInformation.MouseWheelScrollLines / 10

        Dim newY As Integer = -UltraPanel1.ClientArea.AutoScrollPosition.Y - numberOfPixelsToMove
        UltraPanel1.ClientArea.AutoScrollPosition = New Point(0, newY)
End Sub

I see UltraPanel2 moving but the scrollbar of UltraPanel1 does not.

Parents Reply Children
No Data